I’m a begginer using Pytorch, and i’m trying new things. I found a pre-trained model in PyTorch and i’d like to use it to extract the last layer’s output of the network (not the labels, but the last matrix used to extract the layers).
This is the network im using: https://onedrive.live.com/?authkey=!AMkPexmU-lBVnZs&id=C826C2D6F4C7D993!3757&cid=C826C2D6F4C7D993 21
what i’m trying is:
def image_loader(image_name):

    """load image, returns cuda tensor"""

    image = Image.open(image_name)

    image = loader(image).float()

    image = Variable(image, requires_grad=True)

    image = image.unsqueeze(0)  #this is for VGG, may not be needed for ResNet

    return image.cuda()  #assumes that you're using GPU

model = torch.load('pytorch_model.bin', map_location='cpu')
image = image_loader(imagepath)
predictions = model(image)

but i get the error:
TypeError: 'collections.OrderedDict' object is not callable
And i don’t know why…
Any suggestions?