Skip to content

Training classification models on Test set #1102

Answered by LuluW8071
WissamElJ asked this question in Q&A
Discussion options

You must be logged in to vote

In training stage, preds for train dataloader is outputted while on inference stage its prediction on test dataloader .
Its not same.

During model.train(), all the weights at each layers including dropout, batchnorm, layernorm are initialized and gives raw logits on train dataloader which is then transformed into probabilities and hence we get predictions

During model.eval(), weights of train mode are saved but dropout and normalization layers are excluded(turned off), and then generate predictions

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@WissamElJ
Comment options

@LuluW8071
Comment options

@WissamElJ
Comment options

Answer selected by WissamElJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants