Skip to content

Commit

Permalink
improved unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Leao authored and Eduardo Leao committed Mar 27, 2024
1 parent b6750cf commit 0b32eb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ def forward(self, x):

# Backpropagate the loss using neuralforge.tensor's backward() method:
loss.backward()
print(loss)

# Update the weights:
optimizer.step()

# Reset the gradients to zero after each training step:
optimizer.zero_grad()

assert loss._data < 0.1, "Error: Loss is not converging to zero in autograd test."


Expand Down

0 comments on commit 0b32eb6

Please sign in to comment.