RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same

如问题所示,你的输入的类型是字节型的tensor,而加载的权重的类型是float类型的tensor,需要将字节型的tensor转化为float型的tensor。eg:我的程序的部分截图,仅供参考。我当时是没有第18行的转换出现了该问题。

RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be

相关文章:

  • 2021-08-04
  • 2021-09-14
  • 2021-05-20
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
猜你喜欢
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-08-16
  • 2022-01-22
  • 2022-12-23
  • 2021-09-12
相关资源
相似解决方案