I have a float number saved to A, as follows, I wish I can convert it to torch.autograd.variable. Searching the interent I found i can do the following, but now after doing the following, when I print the value of the B (which is the converted number) it does not show me anything.
Then for converting I do:
and the output is:
Variable containing:[torch.cuda.DoubleTensor with no dimension]
P.S. the reason I convert to np.array first is because using torch.from_numpy(A) giving me the error that :
RuntimeError: from_numpy expects an np.ndarray but got numpy.float64