Using windows/anaconda/spyder, python 3.8 I managed to obtain an optimized trained model which classifies thousands of molecules according to their *.png images in binding to a protein: binding (1) and non-binding(0).
The optimized model is kept in a pth file entitled by the DEEPScreen program I used: “AB_best_val-AB-CNNModel1-512-256-0.001-32-0.5-50-VA2-state_dict.pth” or “VA2.pth” for short.
I would like to use the VA2.pth optimized model to infer the 0s or 1s of hundreds of thousands of individual molecular image files already designed and located at the imgs directory (imgs / molecule1.png, molecule2.png, molecule3.png, …).
The only thing I got was to see some of the inside of the VA2.pth (a large collection of numbers) by using the script
model = torch.load(“VA2.pth”)
print(model)
I tried to continue using other lines of code as suggested by the web and documentation ( I am new to PyTorch), but I could not get anything else to work !
Could somebody help me?