Open Galto2000 opened 6 years ago
@Galto2000 I encountered the same error, did you solve it?
visual studio 2017 also meet that problem...
I also encounter this problem, change the .cpu() to .numpy() would solve that. Not sure whether it's because the code of visdom is updated from torch tensor to numpy array.
Sorry for the late response. I was not able to resolve it personally, but I did the thing scyoyo suggested and that fixed it. I also had to change some dimensions, as shown below:
if args.visdom:
vis = visdom.Visdom()
loss_window = vis.line(X=torch.zeros((2,)).numpy(),
Y=torch.zeros((2,)).numpy(),
opts=dict(xlabel='minibatches',
ylabel='Loss',
title='Training Loss',
legend=['Loss']))
that didn't work, any further suggestions?
Use .squeeze() or .unsqueeze() builtin function to subtract or add ndims to 1 respectively. This worked in my program.
Howdy folks
relatively new to Python, numpy, PyTorch (come from C++ and Matlab).
I am using CUDA 9.1, Python 3.6, Torch 0.3.0.post4, running on Ubuntu 16.04 LTS and I am starting off as follows:
python train.py --arch segnet --dataset pascal --visdom True
And I get the error below when I want to invoke visdom (i.e. when I don't include --visdom True, I don't have this issue).
Any suggestions anyone?
Thanks in advance
Galto