sdoifu

parent e151eefe
#!/bin/bash
make -C src -j 4
K=49
outdir=mkdir -p results/einstein
outdir="results/paper/init-mob-samp-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 6 -I 1 data/einstein.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 6 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-mob-rand-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 5 -I 1 data/einstein.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 5 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir=mkdir -p results/einstein
outdir="results/paper/init-kprox-samp-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 6 -I 1 data/einstein.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 6 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-rand-einstein"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 5 -I 1 data/einstein.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 5 -I 1 data/einstein.pbm -v
mv *pbm latest/* ${outdir}
#!/bin/bash
make -C src -j 4
K=49
outdir=mkdir -p results/mnist
outdir="results/paper/init-mob-samp-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 6 data/mnist_data.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 6 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-mob-rand-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 0 -i 5 data/mnist_data.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 0 -i 5 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-samp-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 6 data/mnist_data.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 6 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
outdir="results/paper/init-kprox-rand-mnist"
mkdir -p ${outdir}
rm ${outdir}/*
./run bmf_learn_exp -l 0 -k 36 -m 1 -d 1 -i 5 data/mnist_data.pbm -v
./run bmf_learn_exp -l 0 -k $K -m 1 -d 1 -i 5 data/mnist_data.pbm -v
mv *pbm latest/* ${outdir}
......@@ -2,9 +2,13 @@
import numpy as np
import matplotlib as plt
import pnm
import os
#
# MNIST
#
#
# main results
#
X = pnm.imread('../data/mnist_data.pbm')
Akprox = pnm.imread('./paper/conv-mnist-fwd-kprox/__final_coeffs__.pbm')
Ekprox = pnm.imread('./paper/conv-mnist-fwd-kprox/__final_residual__.pbm')
......@@ -22,14 +26,38 @@ Akprox_e = Akprox[i,:]
Ekprox_e = Ekprox[i,:]
Amob_e = Amob[i,:]
Emob_e = Emob[i,:]
pnm.imsave('dict-mnist-fwd-mob.pbm',Dmob,maxval=1)
pnm.imsave('dict-mnist-fwd-kprox.pbm',Dkprox,maxval=1)
pnm.imsave('Akprox_e.pbm',Akprox_e,maxval=1)
pnm.imsave('Ekprox_e.pbm',Ekprox_e,maxval=1)
pnm.imsave('Amob_e.pbm',Amob_e,maxval=1)
pnm.imsave('Emob_e.pbm',Emob_e,maxval=1)
pnm.imsave('mnist_e.pbm',X_e,maxval=1)
os.system('../src/mosaic_tool Akprox_e.pbm Akprox_mosaic.pbm 40')
os.system('../src/mosaic_tool Ekprox_e.pbm Ekprox_mosaic.pbm 40')
os.system('../src/mosaic_tool Amob_e.pbm Amob_mosaic.pbm 40')
os.system('../src/mosaic_tool Emob_e.pbm Emob_mosaic.pbm 40')
os.system('../src/mosaic_tool mnist_e.pbm mnist_mosaic.pbm 10')
os.system('../src/mosaic_tool mnist_e.pbm mnist_e_mosaic.pbm 40')
#
# initialization results
#
D_rand_0 = pnm.imread('./paper/init-kprox-rand-mnist/__initial_dict_mosaic__.pbm')
pnm.imsave('mnist-init-rand-init.pbm',D_rand_0,maxval=1)
D_rand_kprox = pnm.imread('./paper/init-kprox-rand-mnist/__final_dict_mosaic__.pbm')
pnm.imsave('mnist-init-rand-kprox.pbm',D_rand_kprox,maxval=1)
D_rand_mob = pnm.imread('./paper/init-mob-rand-mnist/__final_dict_mosaic__.pbm')
pnm.imsave('mnist-init-rand-mob.pbm',D_rand_mob,maxval=1)
D_samp_0 = pnm.imread('./paper/init-kprox-samp-mnist/__initial_dict_mosaic__.pbm')
pnm.imsave('mnist-init-samp-init.pbm',D_samp_0,maxval=1)
D_samp_kprox = pnm.imread('./paper/init-kprox-samp-mnist/__final_dict_mosaic__.pbm')
pnm.imsave('mnist-init-samp-kprox.pbm',D_samp_kprox,maxval=1)
D_samp_mob = pnm.imread('./paper/init-mob-samp-mnist/__final_dict_mosaic__.pbm')
pnm.imsave('mnist-init-samp-mob.pbm',D_samp_mob,maxval=1)
#
# EINSTEIN
# EINSTEIN (FALTA)
#
X = pnm.imread('../data/einstein.pbm')
Akprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_coeffs__.pbm')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment