kumar-shridhar / PyTorch-BayesianCNN

Bayesian Convolutional Neural Network with Variational Inference based on Bayes by Backprop in PyTorch.
MIT License
1.42k stars 323 forks source link

net.train() in validation and test phase. #80

Open Hannahhanhan555 opened 1 year ago

Hannahhanhan555 commented 1 year ago

Hi, I'm new to BCNN. I don't know why net.train() was used rather than net.eval() in uncertainty_estimation.py when I want to use the model for inference.

net = getModel(net_type, 1, 10, priors=None, layer_type=layer_type, activation_type=activation_type) net.load_state_dict(torch.load(weight_path)) net.train() net.to(device)

Could someone help me about this?