I’m trying to implement Bayesian Convolutionnal network with Dropout. I have defined two classes: the first class Net_do(nn.Module) (mcdo=Net_do())
for training data and another class Net(nn.Module) (net=Net())
for test data. During the training phase, I did Outputs=mcdo(inputs)
and during the testing phase, I did Outputs=Net(inputs)
I searched for help, but I can´t find a solution to my problem. I will leave the error here, I’m stuck I’m really gonna appreciate your help, Thank you
So when we perform a model(...)
call, it actually ends up calling model.forward(...)
. What you’re seeing here is that it’s calling that method (line 550) but apparently your Net_do
model does not have such a method. Therefore your model instead inherits the forward method from its parent (nn.Module) which raises the NotImplementedError
.
Does your Net_do
have a forward method? If so, can you please post the class code for Net_do
?
Thanks for reply,
yes it has a forward method
Is it Net_MCDO? The forward method is indented one too many times
1 Like
Oh yes ! I just noticed
Thank’s a lot