File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -527,11 +527,11 @@ def calc_ml_prediction(self, input_state=None):
527527 batch_size = 1000
528528 en_pred = []
529529 batch_en = [np .arange (start , start + batch_size ) for start in
530- np .arange (0 , ml_ne - batch_size , batch_size )]
531- if len (batch_en ): # if self.ne is less than batch_size
532- batch_en .append (np .arange (batch_en [- 1 ][- 1 ]+ 1 , ml_ne ))
530+ np .arange (0 , len ( ml_ne ) - batch_size , batch_size )]
531+ if len (batch_en ): # if len(ml_ne) is less than batch_size
532+ batch_en .append (np .arange (batch_en [- 1 ][- 1 ]+ 1 , len ( ml_ne ) ))
533533 else :
534- batch_en .append (np .arange (0 , ml_ne ))
534+ batch_en .append (np .arange (0 , len ( ml_ne ) ))
535535 for n_e in batch_en :
536536 _ = [self .sim .run_fwd_sim (state , member_index , nosim = True ) for state , member_index in
537537 zip ([list_state [curr_n ] for curr_n in n_e ], [list_member_index [curr_n ] for curr_n in n_e ])]
You can’t perform that action at this time.
0 commit comments