Example #1
0
plt.show()
#%%
plt.scatter(codes_all[3500, :], codes_all[4000, :])
plt.show()
#%%
plt.figure(figsize=[8, 10])
plt.pcolor(codes_all.transpose())
plt.xlabel("Image id by generation")
plt.ylabel("code_entry")
plt.show()

#%%
exp_dir = r"D:\Generator_DB_Windows\data\with_CNN"
this_exp_dir = os.path.join(exp_dir, "purenoise")
trial_title = 'choleskycma_sgm3_uf10_cc%.2f_cs%.2f' % (0.00097, 0.0499)
trialdir = add_trial_subdir(this_exp_dir, trial_title)


#%%
def scores_imgname_summary(trialdir, savefile=True):
    """ """
    if "scores_all.npz" in os.listdir(trialdir):
        # if the summary table exist, just read from it!
        with np.load(os.path.join(trialdir, "scores_all.npz")) as data:
            scores = data["scores"]
            generations = data["generations"]
            image_ids = data["image_ids"]
        return scores, image_ids, generations

    scorefns = sorted([
        fn for fn in os.listdir(trialdir)
Example #2
0
from CNNScorer import NoIOCNNScorer
import utils
from utils import add_neuron_subdir, add_trial_subdir, generator, simplex_interpolate
from sklearn.manifold import LocallyLinearEmbedding, MDS
from mpl_toolkits.mplot3d import Axes3D

import importlib
importlib.reload(utils)

#%%

exp_dir = "/home/poncelab/Documents/data/with_CNN/"
neuron = ('caffe-net', 'fc6', 10)
this_exp_dir = add_neuron_subdir(neuron, exp_dir)
trial_title = 'choleskycma_sgm3_uf10_trial%d' % 3
trialdir = add_trial_subdir(this_exp_dir, trial_title)

TestScorer = NoIOCNNScorer(target_neuron=neuron, writedir=this_exp_dir)
TestScorer.load_classifier()

#%% Title: Prepare the high level code set
exp_dir = "/home/poncelab/Documents/data/with_CNN/"
neuron = ('caffe-net', 'fc6', 10)
this_exp_dir = add_neuron_subdir(neuron, exp_dir)
code_total_list = []
score_total_list = []
trial_list = [
    'choleskycma_sgm1_trial0', 'choleskycma_sgm1_trial1',
    'choleskycma_sgm1_trial2', 'choleskycma_sgm1_uf3_trial0',
    'choleskycma_sgm1_uf3_trial1', 'choleskycma_sgm1_uf3_trial2',
    'choleskycma_sgm3_trial0', 'choleskycma_sgm3_trial1',