Skip to content

Commit

Permalink
remove invalid line in hf-models (deepchem#3866)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunppsg authored Mar 5, 2024
1 parent d84bc6e commit c6a33c2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions deepchem/models/torch_models/hf_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,6 @@ def fit_generator(self,
optimizer.zero_grad()
outputs = self.model(**inputs)

if self._loss_outputs is not None:
outputs = [outputs[i] for i in self._loss_outputs]
batch_loss = outputs.get("loss")
batch_loss.backward()
optimizer.step()
Expand Down

0 comments on commit c6a33c2

Please sign in to comment.