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

Running the Camera Demo with CPU results in "TypeError: 'torch.FloatTensor' object is not callable" #23

Open
masarun opened this issue Aug 14, 2018 · 1 comment

Comments

@masarun
Copy link

masarun commented Aug 14, 2018

With Ananoda3 (Python 3.6.5) on Windows, trying to run "python camera_demo.py demo --model models/21styles.model --cuda=0" ended up with the following error.

Traceback (most recent call last):
File "camera_demo.py", line 104, in
main()
File "camera_demo.py", line 101, in main
run_demo(args, mirror=True)
File "camera_demo.py", line 66, in run_demo
simg = style_v.data().numpy()
TypeError: 'torch.FloatTensor' object is not callable

This issue seemed to be fixed with the following change in the line 60 of camera_demo.py
from
simg = style_v.data().numpy()
to
simg = style_v.data[0].numpy()

@Chenfengldw
Copy link

Same problem,
File "camera_demo.py", line 109, in
main()
File "camera_demo.py", line 106, in main
run_demo(args, mirror=True)
File "camera_demo.py", line 73, in run_demo
simg = style_v.data().numpy()
TypeError: 'Tensor' object is not callable

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