40
40
{'name' :'set_sel' ,'help' :'[3k_Disordered, 3k_Ordered, 3k_Ordered_and_gel, 6k_Disordered, 6k_Ordered, 6k_Ordered_and_gel]' ,'type' :str ,'default' :'3k_Disordered' },
41
41
{'name' :'conv_bool' , 'type' :candle .str2bool , 'default' :True , 'help' :'Invoke training using 1D Convs for inner AE' },
42
42
{'name' :'full_conv_bool' , 'type' :candle .str2bool , 'default' :False , 'help' :'Invoke training using fully convolutional NN for inner AE' },
43
- {'name' :'type_bool' , 'type' :candle .str2bool , 'default' :False , 'help' :'Include molecule type information in desining AE' },
43
+ {'name' :'type_bool' , 'type' :candle .str2bool , 'default' :True , 'help' :'Include molecule type information in desining AE' },
44
44
{'name' :'nbr_type' , 'type' :str , 'default' :'relative' , 'help' :'Defines the type of neighborhood data to use. [relative, invariant]' },
45
- {'name' :'backend' , 'help' :'Keras Backend' , 'type' :str , 'default' :'theano ' }
45
+ {'name' :'backend' , 'help' :'Keras Backend' , 'type' :str , 'default' :'tensorflow ' }
46
46
]
47
47
48
48
required = [
58
58
# note 'cool' is a boolean
59
59
'cool' ,
60
60
61
- 'molecular_epochs' ,
62
61
'molecular_num_hidden' ,
63
62
'molecular_nonlinearity' ,
64
63
'molecular_nbrs' ,
@@ -267,7 +266,11 @@ def datagen(self, epoch=0, print_out=1, test=0):
267
266
xt_all = np .array ([])
268
267
yt_all = np .array ([])
269
268
270
- for i in range (num_frames ):
269
+ num_active_frames = random .sample (range (num_frames ), int (self .sampling_density * num_frames ))
270
+
271
+ print ('Datagen on the following frames' , num_active_frames )
272
+
273
+ for i in num_active_frames :
271
274
272
275
if self .conv_net :
273
276
xt = Xnorm [i ]
@@ -308,7 +311,7 @@ def datagen(self, epoch=0, print_out=1, test=0):
308
311
309
312
def train_ac (self ):
310
313
311
- for i in range (self .mb_epochs ):
314
+ for i in range (1 , self .mb_epochs + 1 ):
312
315
print ("\n Training epoch: {:d}\n " .format (i ))
313
316
314
317
frame_loss = []
@@ -322,8 +325,8 @@ def train_ac(self):
322
325
encoder_weight_file = '%s/%s.hdf5' % (current_path , 'encoder_weights' )
323
326
324
327
for curr_file , xt_all , yt_all in self .datagen (i ):
325
- for frame in random .sample (range (len (xt_all )), int (self .sampling_density * len (xt_all ))):
326
-
328
+ # for frame in random.sample(range(len(xt_all)), int(self.sampling_density*len(xt_all))):
329
+ for frame in range ( len ( xt_all )):
327
330
history = self .molecular_model .fit (xt_all [frame ], yt_all [frame ], epochs = 1 ,
328
331
batch_size = self .batch_size , callbacks = self .callbacks [:2 ],
329
332
verbose = 0 )
0 commit comments