added scripts to automatize picture generation

parent 4782837f
#!/bin/python
import numpy as np
import matplotlib as plt
import pnm
#
# MNIST
#
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')
Dkprox = pnm.imread('./paper/conv-mnist-fwd-kprox/__final_dict_mosaic__.pbm')
Amob = pnm.imread('./paper/conv-mnist-fwd-mob/__final_coeffs__.pbm')
Emob = pnm.imread('./paper/conv-mnist-fwd-mob/__final_residual__.pbm')
Dmob = pnm.imread('./paper/conv-mnist-fwd-mob/__final_dict_mosaic__.pbm')
i = []
for j in range(0,10):
i = i + range( (1100*j), (1100*j+4) )
X_e = X[i,:]
Akprox_e = Akprox[i,:]
Ekprox_e = Ekprox[i,:]
Amob_e = Amob[i,:]
Emob_e = Emob[i,:]
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)
#
# EINSTEIN
#
X = pnm.imread('../data/einstein.pbm')
Akprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_coeffs__.pbm')
Ekprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_residual__.pbm')
Dkprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_dict_mosaic__.pbm')
Amob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_coeffs__.pbm')
Emob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_residual__.pbm')
Dmob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_dict_mosaic__.pbm')
This diff is collapsed.
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