caffe-segnet
caffe-segnet copied to clipboard
Problem with Bayesian SegNet Execution
I have successfully created models for SegNet and run the tests and they work properly.
I am currently working on running the Bayesian SegNet models: however, I am unable to due to errors that occur at runtime.
I have models created for the bayesian cases, then I try to execute /SegNet/Scripts/test_bayesian_segnet.py I receive the following error.
ExceptionTraceback (most recent call last)
Exception: Input blob arguments do not match net inputs.
Are there any solutions based on this error that anyone can suggest to get this running correctly?
Thanks.
I think this is descibing that your input tensor dimensions aren't correct. In your model prototxt you need to set the input dimensions (batch, channels, height, width). The numpy array you create here, input_image
, must match these dimensions exactly. The np.repeat
command stacks multiple samples of the same image to fill the minibatch size. This is required to take the Monte Carlo dropout samples.
I actually found out that the code runs when changed to out = net.forward() instead of out = net.forward_all(data=input_image)
However, I am not getting great results. I have trained the network for 60,000 iterations and I still am getting mediocre results. I feel it may be from changing this line in the code. I am trying to use the sample data provided. There should not be any change that needs to be made for that correct? Any help would be appreciated. Thanks.
I am having the same issue, @eweill did you only change the line to out=net.forward()
or did you also add code to load the input image, such as net.blobs['data'].data[...]=input_image