RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 756 and 1008 in dimension 2


原因:输入的图像数据的维度不完全一样(数据集图像大小不一)。

解决方法: transforms.Compose([
transforms.RandomResizedCrop(224),# 随机裁剪])

图片: RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0.

相关文章:

  • 2021-12-28
  • 2021-12-14
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-10
  • 2021-10-26
  • 2021-09-29
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案