##################################
### load the pre-store normalization constant
## Load Prior and transitional Matrix
dic = sio.loadmat('Transition_matrix.mat')
Transition_matrix = dic['Transition_matrix']
Prior = dic['Prior']

outPred = './training/pred/'
####################################
##################load CNN here######
import getopt as opt
from gpumodel import IGPUModel
from options import *

op = ShowConvNet.get_options_parser()
op.options['load_file'].value = r'.\tmp\tmp\ConvNet__2014-05-14_21.42.41'
op.options['feature_path'].value = r'.\prediction_feature'
op.options['test_batch_range'].value = 1
op.options['write_features'].value = 'probs'
load_dic = IGPUModel.load_checkpoint(op.options["load_file"].value)
old_op = load_dic["op"]
old_op.merge_from(op)
op = old_op
op.eval_expr_defaults()
#op, load_dic = IGPUModel.parse_options(op)
op.options['train_batch_range'].value = [1]
op.options['test_batch_range'].value = [1]
model = ShowConvNet(op, load_dic)
meta = pickle.load(open(r'.\storage\batches.meta'))
data_mean = meta['data_mean']
Ejemplo n.º 2
0
##################################
### load the pre-store normalization constant
## Load Prior and transitional Matrix
dic=sio.loadmat('Transition_matrix.mat')
Transition_matrix = dic['Transition_matrix']
Prior = dic['Prior']

outPred='./training/pred/'
####################################
##################load CNN here######
import getopt as opt
from gpumodel import IGPUModel
from options import *

op = ShowConvNet.get_options_parser()
op.options['load_file'].value=r'.\tmp\tmp\ConvNet__2014-05-14_21.42.41'
op.options['feature_path'].value=r'.\prediction_feature'
op.options['test_batch_range'].value=1
op.options['write_features'].value ='probs'
load_dic =  IGPUModel.load_checkpoint(op.options["load_file"].value)
old_op = load_dic["op"]
old_op.merge_from(op)
op = old_op
op.eval_expr_defaults()
#op, load_dic = IGPUModel.parse_options(op)
op.options['train_batch_range'].value=[1]
op.options['test_batch_range'].value=[1]
model = ShowConvNet(op, load_dic)
meta = pickle.load(open(r'.\storage\batches.meta'))
data_mean = meta['data_mean']
Ejemplo n.º 3
0

####################################  PER CNN customize
Flag_multiview = 0
CNN_NAME = 'ConvNet__2014-05-26_03.40.18_155'
outPred='./ConvNet_3DCNN/training/Test_3DCNN_' + CNN_NAME
if not os.path.exists(outPred):
    os.makedirs(outPred)   
####################################
##################load CNN here######
import getopt as opt
from gpumodel import IGPUModel
from options import *


op = ShowConvNet.get_options_parser()
#op.options['load_file'].value=r'.\ConvNet_3DCNN\tmp\ConvNet__2014-05-28_01.59.00'
### old
op.options['load_file'].value=r'I:\Kaggle_multimodal\StartingKit_track3\Final_project\ConvNet_3DCNN\tmp\ConvNet__2014-05-26_03.40.18'

op.options['write_features'].value ='probs'
load_dic =  IGPUModel.load_checkpoint(op.options["load_file"].value)
old_op = load_dic["op"]
old_op.merge_from(op)
op = old_op
op.eval_expr_defaults()
op.options['train_batch_range'].value=[1]
op.options['test_batch_range'].value=[1]
op.options['data_path'].value=r'.\ConvNet_3DCNN\storage_sk_final'

model = ShowConvNet(op, load_dic)
Ejemplo n.º 4
0
##################################
### load the pre-store normalization constant
## Load Prior and transitional Matrix
dic=sio.loadmat('Transition_matrix.mat')
Transition_matrix = dic['Transition_matrix']
Prior = dic['Prior']

outPred='./ConvNet_3DCNN/training/pred_sk_norm/'
####################################
##################load CNN here######
import getopt as opt
from gpumodel import IGPUModel
from options import *
Flag_multiview = 0

op = ShowConvNet.get_options_parser()
op.options['load_file'].value=r'.\ConvNet_3DCNN\tmp\ConvNet__2014-05-28_01.59.00'
op.options['write_features'].value ='probs'
load_dic =  IGPUModel.load_checkpoint(op.options["load_file"].value)
old_op = load_dic["op"]
old_op.merge_from(op)
op = old_op
op.eval_expr_defaults()
op.options['train_batch_range'].value=[1]
op.options['test_batch_range'].value=[1]
op.options['data_path'].value=r'.\ConvNet_3DCNN\storage_sk_final'

model = ShowConvNet(op, load_dic)
model.crop_border = 0