Hi guys,
I am testing my model for the same image and the prediction output is going different every time I run the code.
model = loader(‘balanca.pth’)
classe = (‘Balanca’,‘False’)
model.eval()
img = Image.open(“ImgTest/All/0n.png”)
x = transform(img)
x = x.unsqueeze(0)
output = model(x)
pred = torch.argmax(output,1)
print(‘Image predict as:’,classe[pred])