【踩坑】RuntimeError: Input and parameter tensors are not the same dtype, found input tensor with Double
报错
RuntimeError: Input and parameter tensors are not the same dtype, found input tensor with Double and parameter tensor with Float
github issue
在GRU网络,需要传入Float的tensor,但是我传入的dtype是torch.float32
因此需要先转成float
output=output.float()
还没有评论,来说两句吧...