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

Upgrade code to PyTorch 0.4 #69

Closed
metro-smiles opened this issue Sep 26, 2018 · 9 comments
Closed

Upgrade code to PyTorch 0.4 #69

metro-smiles opened this issue Sep 26, 2018 · 9 comments

Comments

@metro-smiles
Copy link

Hi,

I was wondering if you've planned to update this repo, to ensure compatible with PyTorch 0.4+, sometime soon?
This would be really helpful, since I have other modules in my repo that require PyTorch 0.4+.

@ruotianluo
Copy link
Owner

Try the self-critical.pytorch one. That is updated to 0.4 and contains everything this repo has.

@metro-smiles
Copy link
Author

metro-smiles commented Sep 29, 2018

@ruotianluo, @dmitriy-serdyuk Has this repo now been ported to PyTorch 0.4 completely?

@ruotianluo
Copy link
Owner

I actually haven't tested it yet, you can give a try. I assume it's ok.

@metro-smiles
Copy link
Author

I think the models folder needs updating

@metro-smiles
Copy link
Author

metro-smiles commented Sep 29, 2018

Just tried, got the following error:
models/CaptionModel.py", line 50, in beam_step candidate_logprob = beam_logprobs_sum[q] + local_logprob RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #3 'other'

@dmitriy-serdyuk
Copy link
Contributor

Strange, it worked for me

@dmitriy-serdyuk
Copy link
Contributor

How do you run it? I tested with pytorch 0.4.1 only, which version do you use?

@metro-smiles
Copy link
Author

@dmitriy-serdyuk I used PyTorch 0.4.1 as well. Did you try using it (i.e. performing inference) on non-COCO images?

@metro-smiles
Copy link
Author

@ruotianluo , @dmitriy-serdyuk Got it to work for pre-trained models but like I mentioned, had to update the scripts in the models folder...

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

3 participants