PyTorch-Multi-Style-Transfer icon indicating copy to clipboard operation
PyTorch-Multi-Style-Transfer copied to clipboard

running the demo

Open doramir opened this issue 7 years ago • 1 comments

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

doramir avatar Jul 26 '18 04:07 doramir

@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.

karenerobinson avatar Oct 08 '18 00:10 karenerobinson