AttributeError: 'torch.cuda.LongTensor' object has no attribute 'pow'

Hi, all:
I encounter the blew error when running meter_map.add(output.data,target.cuda(async=True))

AttributeError: 'torch.cuda.LongTensor' object has no attribute 'pow'

pytorch version: 0.2
Does this version not implement the pow function in cuda mode?:joy:

Thanks.

PyTorch only implements pow() on floating point types (both CPU and CUDA)

1 Like