Could you post a code snippet throwing this error?
I would generally recommend to use the factory method torch.tensor instead of torch.Tensor, since the latter will return uninitialized values if you provide a tensor shape.