ncullen93:

.type(‘torch.DoubleTensor’)


Cast seems not to work in pytorch 1.0. Please see the output below. How can I fix that, please?



d.type(torch.DoubleTensor)
tensor([[[ 1.5446,  0.3419,  0.1070, -0.6632,  0.5054,  0.7074],
[-0.5460, -0.0041, -0.6613, -1.5072,  0.4836,  3.1626],
[-0.9564,  1.8512, -0.6912, -1.0977,  0.4808, -0.5918],
[-1.3628,  2.2673, -0.9875,  1.0004,  0.1614, -0.4596],
[-2.0670,  1.4336, -1.1763,  0.1440, -0.5740,  0.2190]],



    [[ 1.5446,  0.3419,  0.1070, -0.6632,  0.5054,  0.7074],
     [-0.5460, -0.0041, -0.6613, -1.5072,  0.4836,  3.1626],
     [-0.9564,  1.8512, -0.6912, -1.0977,  0.4808, -0.5918],
     [-1.3628,  2.2673, -0.9875,  1.0004,  0.1614, -0.4596],
     [-2.0670,  1.4336, -1.1763,  0.1440, -0.5740,  0.2190]]],
   dtype=torch.float64)