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

Python OverflowError #6433

Open
thomy800 opened this issue Jun 21, 2018 · 4 comments
Open

Python OverflowError #6433

thomy800 opened this issue Jun 21, 2018 · 4 comments

Comments

@thomy800
Copy link

Hi

Issue summary

I trained an LSTM network without any problems. However if I load the network in Python 3.5.2 the following error occures:

Traceback (most recent call last):
File "../../evaluate.py", line 78, in
print(net.params['conv1'])
File "/caffe/python/caffe/pycaffe.py", line 67, in _Net_params
self._layer_names, self.layers)
File "/caffe/python/caffe/pycaffe.py", line 68, in
if len(lr.blobs) > 0])
OverflowError: cannot fit 'int' into an index-sized integer

Steps to reproduce

I trained several networks. Only the two networks using LSTM crash when accessing the data. I might provide the network and model if requested.

Tried solutions

Apparently the number returned from len is too big. Therefore I tried commenting if len(lr.blobs) > 0 but then a SegmentationFault occured.

I also tried this:
net = caffe.Net(args.model, args.weights, caffe.TEST) for name, lr in zip(net._layer_names, net.layers): print(name) try: print(' ',len(lr.blobs)) except: print(' ?')
which showed that the numbers for all my layers are in fact large and random. If I execute it multiple times the numbers varry.

System configuration

  • Operating system: Ubuntu 16.04
  • Compiler: GCC 5.4.0
  • CUDA version (if applicable): 9.0
  • CUDNN version (if applicable): v7.1
  • Python version (if using pycaffe): 3.5.2

Cheers,
Thomy800

@thomy800
Copy link
Author

thomy800 commented Aug 1, 2018

In the meantime I figured out it does not relate to LSTM. The same script and model works on a different machine. Apparently it's connected with the caffe installation itself...

@Noiredd
Copy link
Member

Noiredd commented Aug 17, 2018

Could be useful if you printed those lengths so we could see what we're working with.

@ferrannoguera
Copy link

I have the same problem, did you manage to find a solution?

@JubilantJerry
Copy link

I got this error, and this link solved it for me at least:

#2437 (comment)

TL;DR rebuild your caffe

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

4 participants