sm = nn.Softmax(dim = 1)
data=test_transforms(PIL.Image.open(image_path))        #im = PIL.Image.open(image_path)
data.unsqueeze_(0)
data=Variable(data)
data = data.type(torch.FloatTensor)
classifier.eval()
output = classifier(data)
print(labels[output.cpu().data.numpy().argmax()])
got this error
NameError                                 Traceback (most recent call last)
 in 
1 sm = nn.Softmax(dim = 1)
2
----> 3 data=test_transforms(PIL.Image.open(image_path)) #im = PIL.Image.open(image_path)
4
5 data.unsqueeze_(0)
NameError: name ‘PIL’ is not defined