Closed tslever closed 3 years ago
Hi, @tslever
I'm not sure, but this question in PyTorch forum seems to be relevant to your problem. Would you change this part of the code as follows and see if it works?
def _scale(x):
return x.astype(np.float32) / 255
def _add_channel(x):
return x[None, :, :]
def _create_mpiigaze_transform(config: yacs.config.CfgNode) -> Any:
transform = torchvision.transforms.Compose([
torchvision.transforms.Lambda(_scale),
torch.from_numpy,
torchvision.transforms.Lambda(_add_channel),
])
return transform
Commenting and inserting the following code resulted in the following error.
@tslever
I suppose the error has something to do with this issue. What is your PyTorch version? It seems to have been fixed in 1.5.1. I tried older versions and got the error in 1.5.0 but not in 1.5.1 or 1.6.0 on Ubuntu.
I'm running torch 1.6.0 and torchvision 0.7.0 on Windows 10. I think I'll switch to Ubuntu, unless you have other suggestions.
@tslever
I see. So it's not a version problem. I think it would be easier to switch to Ubuntu too.
hysts,
Would you be willing to help me debug the following "EOFError: Ran out of input", which I encountered after installing required libraries, downloading and extracting "MPIIGaze.tar.gz" to "C:\Users\thoma\Documents\AI\mpiigaze\datasets", running preprocess_mpiigaze.py, and executing "python train.py --config configs/mpiigaze/lenet_train.yaml"?
Thank you,
Tom Lever