Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'outputs/models/non_adapted_cnn.pt' #1

Open
tchinchuthomas opened this issue Sep 20, 2019 · 4 comments

Comments

@tchinchuthomas
Copy link

Hi,

I tried to reproduce the results according to the steps mentioned and I am getting this error. Could you please suggest if there is anything missing?

Thank you.

@dr-costas
Copy link
Owner

Hi,

As the error says, the code cannot find the file non_adapted_cnn.pt.

I now see that the file is non_adapted_cnn.pytorch. That is, the file name is non_adapted_cnn, but the ending is pt and not pytorch.

Please confirm that you have the file called non_adapted_cnn at the directory outputs/models. Then, check the extension of the file. If the extension is pytorch, please change it to pt.

I will fix that in the code in the following days.

Let me know if it worked for you.

@tchinchuthomas
Copy link
Author

Hi,
Thank you for the quick response.

Actually I tried with label_classifier.pt and non_adapted_cnn.pt at the directory outputs/models.
Then I got the following error:
RuntimeError: Error(s) in loading state_dict for LabelClassifierAUDASC:
Missing key(s) in state_dict: "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias", "classifier.6.weight", "classifier.6.bias".
Unexpected key(s) in state_dict: "linear_layers.0.weight", "linear_layers.0.bias", "linear_layers.1.weight", "linear_layers.1.bias", "output_layer.weight", "output_layer.bias".

Could you please let me know the issue?

Thank you.

@dr-costas
Copy link
Owner

Hi,

I see! Thank you for reporting that. I will fix it and do a commit.

The problem that you see is caused because I changed the code from the original one that provided the classifier (from the repository of our previous paper). Now PyTorch cannot find the same names for class members, and this is the error message.

Thank you for reporting it! I thought that I had fix it before publishing this repo... it seems that I was wrong :)

Sorry!

@tchinchuthomas
Copy link
Author

Hi,

Thank you for the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants