Hi, I am trying to use a pretrained model (Resnet for example, by removing the last 2 layers and adding a 1*1  conv to get the desired shaped output ) this output will be used as input for another model.
How can I get the  output of the new model.
This is the original model:
model = models.resnet152(pretrained=True)
the new model is
newmodel = torch.nn.Sequential(*(list(model.children())[:-2]))
newmodel.add_module(“convlast”,nn.Conv2d(2048, 64, 1))