情况:就是本来你的 tensor 是有东西的,代码也应该是没问题的,百度无果,debug无果。
原因:突然发现了这一行 failed to allocate 202.56M (212402176 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
然后用 nvidia-smi 查看,发现确实是服务器上GPU的内存被大家占了,导致你的 tensor 没有位置放,所以错误提示 empty tensor
解决办法:就是看看哪个GPU内存够,就去哪个上面运行。

关于GPU情况的查看和指定,参见我之前的文章 tensorflow–GPU

Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are相关推荐

  1. bn层Expected more than 1 value per channel when training, got input size torch.Size

    报错代码: File "E:/project/fenge/jacke121-U-2-Net-master_mse/nets/bisnet.py", line 106, in for ...

  2. Expected more than 1 value per channel when training, got input size torch.Size

    Expected more than 1 value per channel when training, got input size torch.Size 训练的时候,batch size必须大于 ...

  3. Debug Pytorch: ValueError: Expected more than 1 value per channel when training, got input size tor

    ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512] ...

  4. pytorch训练时报input size错误问题

    错误提示: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1] ...

  5. torchsummary 中input size 异常的问题

    爪爪熊原创文章----谢绝转载 本文解决问题: torchsummary针对多个输入模型的时候,其输出信息中input size等存在着错误,这里提供方案解决这个错误. 当我们使用pytorch搭建好 ...

  6. RuntimeError:Given input size:(256x1x1). Calculated output size: (256x0x0).Output size is too small

    RuntimeError: Given input size: (256x1x1). Calculated output size: (256x0x0). Output size is too sma ...

  7. Kernel size can‘t be greater than actual input size的解决方案

    报错信息:RuntimeError: Calculated padded input size per channel: (49). Kernel size: (64). Kernel size ca ...

  8. Inception-v3报错:RuntimeError: Calculated padded input size per channel: (3 x 3). Kernel size: (5 x 5)

    在PyTorch1.7.1环境下运行PyTorch官方提供的ImageNet预训练模型Inception-v3报错如下: RuntimeError: Calculated padded input s ...

  9. RuntimeError: Given input size: (256x4x4). Calculated output size: (256x0x0). Output size is too sma

    最近在跑一个联邦学习项目,用到的数据集是cifa-10,跑代码时出现以下报错: RuntimeError: Given input size: (256x4x4). Calculated output ...

最新文章

  1. vue中axios如何实现token验证
  2. php excel类 ,phpExcel使用方法介绍
  3. JAVA中的this怎么理解_Java中的this关键字怎么理解?
  4. win10关闭“Windows安全中心”功能的两种方法
  5. php上下属对应关系,由主分类 ID 取出(多个)下级子分类所对应的项,有没有什么好的办法?(其实似乎和 PHP 没什么直接关系?)...
  6. 测试开发新手:从0到1开展性能测试必备的性能测试要点!
  7. APP性能测试之GT 测试
  8. C语言设计一个投票程序,c语言程序设计投票程序
  9. Wex5 app 学习笔记(二)
  10. 带sex的net域名_域名劫持的几种方法、域名劫持有什么方式
  11. yolov2 损失函数_深度学习计算机视觉之YOLO,YOLOv2和YOLOv3算法(超详细解析)
  12. Java接入微信支付超级详细教程——从入门到精通
  13. shell中test命令用法详解
  14. MMI of UIQ
  15. 去中心化借贷协议Trister’s Lend全面内测并提交合约代码安全审计
  16. P型硅与N型硅的区别
  17. PTA 找单词 (15分)(bfs)
  18. 非即插即用型设备驱动的加载过程
  19. 五月节日营销活动方案
  20. dell服务器sd卡位置,“验证戴尔平板电脑SD卡槽功能正常方法”的解决方案

热门文章

  1. linux kernel编译 undefined reference to `__ae
  2. Android bootchart(二)
  3. 如何 给给软件开发 添加 代理_敏捷开发是如何被跑偏的
  4. android 控件方向旋转90度,android – 旋转视图层次90度
  5. 长亭php反序列化防护_CTF-攻防世界-Web_php_unserialize(PHP反序列化)
  6. nedc工况_东南DX3 EV续航升级 NEDC综合工况续航451公里
  7. python 播放声音_如何用Python播放声音?
  8. Unknown encoder ‘libx264‘的解决方法
  9. LeetCode 911. 在线选举(二分查找)
  10. LeetCode 356. 直线镜像