Also I realise that if my input is RGB the input/yellow needs to be 3 and if it’s grayscale it needs to be 1. Slowly trying to provide intuition.




 ptrblck:

There might be utility functions in the wild, but I would recommend to use a dummy input tensor, print all necessary activation shapes, and set the input features of linear layers in this way.
Since each forward pass is dynamic in PyTorch and the computation graph will be created during the forward pass, the shape inference is not straightforward to calculate in eager mode.


I don’t quite understand how to do this. As mentioned, I think this is the portion that I’m kinda lost ( I do not know how to debug/go to manual mode ). Is there any tutorial that explain on this?
But I did google and manage to find from Pytorch 60mins blitz from the documentation.
which I adapted to my code [51] . but I’m not sure how to proceed from here.
image759×611 16.1 KB
Also, I find this is pretty neat and with this I do not need to calculate the FC.
image672×641 35.7 KB
Thanks