stagewise-knowledge-distillation icon indicating copy to clipboard operation
stagewise-knowledge-distillation copied to clipboard

Runtime Error while running the code

Open DanielSHKao opened this issue 3 years ago • 7 comments

Hi, I followed the instruction for environment setup but have a runtime error while running the code for your proposed method. The error was about a datatype exception that expect a float but received a double.

DanielSHKao avatar Jul 25 '22 14:07 DanielSHKao

Hi, did you try explicitly converting the variable to float using .float()? That usually works but I'm not sure where exactly you got the error.

akshaykulkarni07 avatar Jul 25 '22 15:07 akshaykulkarni07

Please find the following screenshot for the detail about the error message. image

DanielSHKao avatar Jul 25 '22 15:07 DanielSHKao

The error is coming from the fastai dataset code that we had used. Could you check the fastai, pytorch and python versions that you are using? We did not face any such problem with our setup, but I had last checked it almost 2 years ago.

Please also see the issue #14 where there was a problem with data preprocessing because fastai v2.0 was used while our code used the older v1.0.60.

akshaykulkarni07 avatar Jul 26 '22 12:07 akshaykulkarni07

I am using fastai 1.0.60, pytorch 1.10.1+cu102, and python 3.6.13.

DanielSHKao avatar Jul 27 '22 07:07 DanielSHKao

Could you try with PyTorch 1.3.1? we had used that version. You can use our environment.yml file for installing a new environment. The reason is that PyTorch has had many changes from 1.3 to 1.10 which may be causing the problem.

akshaykulkarni07 avatar Jul 27 '22 10:07 akshaykulkarni07

May I know the version of torchvision You used? It seems like there are still some problems even if I use torch 1.3.1.

DanielSHKao avatar Jul 30 '22 07:07 DanielSHKao

Sorry, I don't have access to the original environment that I used and I cannot find the version of torchvision corresponding to 1.3.1 of torch. But you can try installing 1.4 - link for installation instructions, as it won't be too different from 1.3.1. The torchvision version for torch 1.4 is 0.5

akshaykulkarni07 avatar Jul 30 '22 09:07 akshaykulkarni07

Closing due to inactivity. Please feel free to re-open or open another issue for other queries.

akshaykulkarni07 avatar Sep 02 '22 07:09 akshaykulkarni07