zhanghang1989 / PyTorch-Multi-Style-Transfer

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

running the demo #22

Open doramir opened 6 years ago

doramir commented 6 years ago

im getting this error IndexError: too many indices for array

File "main.py", line 290, in <module>
    main()
  File "main.py", line 49, in main
    optimize(args)
  File "main.py", line 102, in optimize
    tbar.set_description(total_loss.data.cpu().numpy()[0])
IndexError: too many indices for array
karenerobinson commented 5 years ago

@doramir Look at the 'reshape' part of my answer to issue 21 :

https://github.com/zhanghang1989/PyTorch-Multi-Style-Transfer/issues/21

I debugged it by doing 'python -m pdb' in place of 'python' and checking the shape of a few objects when the code stopped.