zhanghang1989 / PyTorch-Multi-Style-Transfer

Neural Style and MSG-Net
http://hangzh.com/PyTorch-Style-Transfer/
MIT License
976 stars 207 forks source link

"TypeError: 'torch.FloatTensor' object is not callable" running demo on CPU #7

Closed Carmezim closed 6 years ago

Carmezim commented 6 years ago

Sorry if I'm missing something, I'm unfamiliar with PyTorch. I'm running the demo on CPU on a Mac and getting the following error:

  File "camera_demo.py", line 93, in <module>
    main()
  File "camera_demo.py", line 90, in main
    run_demo(args, mirror=True)
  File "camera_demo.py", line 60, in run_demo
    simg = style_v.data().numpy()
TypeError: 'torch.FloatTensor' object is not callable

Thanks.

dlazares commented 6 years ago

@Carmezim I changed line 56 in camera_demo.py to if not args.cuda and that works. It looks like @zhanghang1989 flipped the if and else conditions