So I am trying to use the Pytorch implementation of the VGG16 model. In other words, I downloaded the model and waits through the usual Pytorch API.
I need to make some changes at the bottom of the pre-trained model, to accommodate my own data. I was wondering if there is a way to “step through” the model with some random data, so that I can check the sizes of the input and output tensors for each layer? Now I could do a print(model) and see the summary information for each layer, and that is fine. But the summary info does not always match up exactly with the tensors coming into that layer–because the layer will automatically adjust itself for different batch sizes or other settings.
Hence, I wanted to see if I could just generate some data and step through a pretrained model. Is there a way to do this, using pdb or something? I guess part of my confusion is I could not find in the documentation the structure of these model objects.
Thanks.