codertimo / codertimo/BERT-pytorch

Why not use torch.no_grad when evaluating test data?

Open
#92 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.5k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The way the trainer is set up the `iteration` that is used for train and test is similar except when train step is run the backwards propagation occurs. But one other thing I typically see different between test and train is that in the test batch `with torch.no_grad()` is used so that, for example, dropout is not applied. Was there any reason this isn't used here?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.