Skip to content

Commit

Permalink
Feature remove code (#50)
Browse files Browse the repository at this point in the history
Remove redundant code 'net.train()'
  • Loading branch information
AlexHex7 authored Aug 23, 2022
1 parent 9089828 commit 57f5230
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ to **Non-Local_pytorch_0.3.1/**.

16. Verify that the code works well in **pytorch 1.12.0**.

17. Remove redundant the code `net.train()` in training code files.

## Todo
- Experiments on Charades dataset.
- Experiments on COCO dataset.
Expand Down
2 changes: 0 additions & 2 deletions demo_MNIST_AMP_train_with_single_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
total_acc += acc
total_sample += img_batch.size(0)

net.train()

mean_acc = total_acc.item() * 1.0 / total_sample
mean_loss = sum(total_loss) / total_loss.__len__()

Expand Down
2 changes: 0 additions & 2 deletions demo_MNIST_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
total_acc += acc
total_sample += img_batch.size(0)

net.train()

mean_acc = total_acc.item() * 1.0 / total_sample
mean_loss = sum(total_loss) / total_loss.__len__()

Expand Down

0 comments on commit 57f5230

Please sign in to comment.