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

Got error when import geffnet using Google Colab #11

Closed
cwza opened this issue Oct 31, 2019 · 1 comment
Closed

Got error when import geffnet using Google Colab #11

cwza opened this issue Oct 31, 2019 · 1 comment

Comments

@cwza
Copy link

cwza commented Oct 31, 2019

When I import geffnet in Google Colab.
I got some error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-1dbdac5fd1e4> in <module>()
----> 1 import geffnet

3 frames
/usr/local/lib/python3.6/dist-packages/geffnet/layers.py in versiontuple(v)
      5 
      6 def versiontuple(v):
----> 7     return tuple(map(int, (v.split("."))))[:3]
      8 
      9 

ValueError: invalid literal for int() with base 10: '0+cu100'

I think it is because the torch.version string is '1.3.0+cu100' in Google Colab.
Maybe we can use some regular expression to parse this??

> /usr/local/lib/python3.6/dist-packages/geffnet/layers.py(7)versiontuple()
      5 
      6 def versiontuple(v):
----> 7     return tuple(map(int, (v.split("."))))[:3]
      8 
      9 

ipdb> v
'1.3.0+cu100'
ipdb> v.split(".")
['1', '3', '0+cu100']
@rwightman
Copy link
Owner

Thanks, that was a half-assed attempt that I was planning to remove. Now that I'm supporting more advanced torchscript usage probably no point in attempting to support anything below pytorch 1.2 anyhow. It's been removed.

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