Closed Kuro96 closed 4 years ago
Dropout is used during training to prevent co-adaptation of neurons. On test time you just turn it off. So you just set it to True during training and once you want to load the weights for inference you initialize the model with dropout set to False.
If you say so. But I'd rather set default value of --dropout
in get_inference_parser()
to False
.
Anyway, your code helped a lot, thx bro
That's a valid point, I shouldn't expect the user to set it to False himself, I'll change it. I'm glad the code helped anyway.
Hey dude, you've used dropout incorrectly
nn.Dropout
performs different during train and test phase, your code will result in incorrect inference