Closed GhadeerElmkaiel closed 3 years ago
Hi,
Does the code run as expected if you do not load the Global Policy model?
Can you give the command you are using to run the code?
Thanks for the fast reply! I was trying to do some changes to the code to work with MatPlot3d dataset, but I didn't change any thing related to the models, input shapes, or output shapes, (I used the same exact models provided by you). After some digging in the code, I think that I found what can be the cause of the error. in your model.py code, when you calculate the out_size of the Global_Policy you use int() for the whole expression, while what is happening in the reality that the MaxPool2d is applying int() for each axis alone (x-axis and y-axis). I think that the out_size should be calculated as follows:
out_size = int(input_shape[1] / 16.) *int( input_shape[2] / 16.)
Because when using the original code with input shape [8, 500, 500] we will get
out_size= int(500/16. * 500/16.) = int(31.25 * 31.25) = int(976,5625) = 976
while after applying 4 MaxPool2d(2) we will have an image of size [31, 31], and the out_size will be out_size=961
I found the cause of the error, it seems that I have changed the size of the map unintentionally. after fixing that the model can be loaded perfectly. Sorry It was my fault.
Hi, I faced this problem when I tried to use the pretrained model for the Global Policy. It seems that the size of the used neural network in the code is not the same as the size of the saved model. I got the following error:
I downloaded the pretrained models uploaded on cs.cmu.edu as follows:
So what is the correct shape of the used Global Policy neural network? Can anyone help explaining how this might happen?