feiyang-cai commited on
Commit
6967f07
·
1 Parent(s): 21ff76d
Files changed (1) hide show
  1. utils.py +2 -0
utils.py CHANGED
@@ -277,6 +277,8 @@ class MolecularGenerationModel():
277
  del batch['property_names']
278
  del batch['non_normalized_properties']
279
 
 
 
280
  input_length = batch['input_ids'].shape[1]
281
  steps = 1024 - input_length
282
 
 
277
  del batch['property_names']
278
  del batch['non_normalized_properties']
279
 
280
+ batch = {k: v.to(self.model.device) for k, v in batch.items()}
281
+
282
  input_length = batch['input_ids'].shape[1]
283
  steps = 1024 - input_length
284