Open benfig1127 opened 4 years ago
I recommend using the names.py
file included in the project folder, as this code is guaranteed to work. If you want to use your own code, however, changing the line in your warmstart section that loads the model from
model_dict = torch.load(os.path.join(args.warm_start,'model'))
to
model_dict = torch.load(os.path.join(args.warm_start,'model'), map_location='cpu')
should fix the cuda problem.
Fantastic, thanks I didn't realize you included your own names.py in the project folder lol. Thanks for the help :).
Maybe I should have watched the YouTube videos first before asking stupid questions haha sorry 😅.
I am having trouble loading the model for Part 1 of the project, the first problem I ran into was the fact that the args file contains command line arguments I did not specify in my original
names.py
I attempted to solve this problem by just adding dummy command line arguments that do not do anything in order to let the pretained model load. For exampleIn my actual code this line does nothing other than seem to fix the problem of warm starting from a model with new arguments. However, after fixing this error message I am greeted with an error message I have no idea how to solve. It looks like this model was trained using CUDA while my machine is a CPU only machine which throws the following error:
I am not sure how to fix this problem and would appreciate any help on any of this! Thanks :)