Open redhat12345 opened 6 years ago
Are you using Pytorch 0.4? if you have Pytorch 0.4 or higher self.y[index]
will be a tensor instead of an integer, which then allows you to apply the function .clone()
to it
Thanks.
Awesome, did it work after upgrading to 0.4?
Thanks for the reply. Yeah it's working now.
Hi, May I know how you plot the graph for your paper? May I get the code for plotting graph, please?
Thanks for the interest! are you referring to the plot in Figure 9? I used PrettyPlots
as uploaded here: https://github.com/IssamLaradji/PrettyPlots
Actually, I am talking about figure 3 and 8 in the paper.
I generated Figure 8 using the visEmbed(exp_dict)
function in addons/vis.py
.
I generated Figure 3 using visdom
scatter plot https://github.com/facebookresearch/visdom
Cheers.
@IssamLaradji May I know how you draw the Figure 8?
@IssamLaradji When I run the following command, I got the following error:
$ python vis.py
File "vis.py", line 11, in
Traceback (most recent call last):
File "vis.py", line 16, in
@redhat12345 are you using Python 3? if you are using Python 2 then you get this error you mentioned because it does not use absolute
import (it uses relative import instead).
I generated Figure 8 using the visEmbed(exp_dict)
function in addons/vis.py
.
@IssamLaradji I am using Python 3. When I run the command: $ python3 addons/vis.py
It gives me some warning this time and did not produce any images in the Summarises folder that i created here.
"/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, kwds) /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, *kwds) /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(args, kwds) /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 "
I got the following error.
File "/media/redhat/DATA/M-ADDA/datasets/uspsBig.py", line 69, in getitem img, label = self.X[index].clone(), self.y[index].clone() AttributeError: 'int' object has no attribute 'clone'