I forgot to mention how to get the label predictions from the output or scores. It’s very easy. Note that output from a model is always a tensor that has a max method:
output = pretrained_resnet101(input)
predictions = output.max(1) 

output has size [N x1000 x 1 x 1] if you don’t modify the Resnet and N is the batch size.
We want indexes of max scores over categories which are on the dimension with index 1 so we take the max over the dimension with index 1.