@ptrlblck, lets say if the model were an instance of a neural network class
model=Conv_net().to(device)

Now during the training phase, I would be using the forward function of the class to forward propagate and optimize the parameters. The parameters here are not the weights of the network, rather some parameters of a probability distribution to which the weights belong to.
During the eval() phase, I would have to first sample the trained probability distribution (paramerterized by the weight parameters) and then pass the sampled weights to the neural network
so during the model.eval() phase, I would not be able to do something like the following:
model.eval()
for images,labels in valid_loader:
yout=model(images)
...
..

However, if i have the samples of the distribution, I want to do the following to see my validation accuracy:
y1=F.convd(images,w_sampled_1,padding=1)
y2=z1(y1)... 
etc

Is there a way to run inference of this kind using model instance rather than a dictionary?