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

'float' object cannot be interpreted as an integer #39

Closed
leadcain84 opened this issue Aug 8, 2018 · 1 comment
Closed

'float' object cannot be interpreted as an integer #39

leadcain84 opened this issue Aug 8, 2018 · 1 comment

Comments

@leadcain84
Copy link

Anyone solve same problem?

File "train.py", line 142, in
train(epoch,args)
File "train.py", line 101, in train
bs=args.bs,shuffle=True,nthread=6,imagesize=128)
File "/DL/pytorch/sphereface_pytorch/dataset.py", line 60, in init
self.nparrimage = np.frombuffer(self.arrimage.get_obj(),np.float32).reshape(10,len(self.arrimage)/10)
TypeError: 'float' object cannot be interpreted as an integer

@leadcain84
Copy link
Author

I solved it.
change the "(self.arrimage)/10)" to "(self.arrimage)//10)"

my env is follow:
pytorch 0.2.0
python 3.4

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

1 participant