Solved by Manuel_Alejandro_Dia in post #2 
              
              
                You can replace the code for the network in the Creating Models part for: 
model = torch.hub.load('pytorch/vision:v0.10.0', 'densenet121', pretrained=True)
model.eval()

Remember to change the last layer though!