这错是因为居然自己蠢到在pytorch用list当tensor用

将get_image转成tensor即可

get_image=torch.from_numpy(numpy.array(get_image))

这里我的get_image是list,所以要转tensor

AttributeError: ‘list’ object has no attribute “dim”相关推荐

  1. AttributeError: ‘Embeddings‘ object has no attribute ‘d_model‘

    求助AttributeError: 'Embeddings' object has no attribute 'd_model' embedding.d_model不是transformer_util ...

  2. Python错误:AttributeError: 'generator' object has no attribute 'next'解决办法

    今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数 def liebiao(): for x in range(10): yield x #函 ...

  3. AttributeError: 'dict' object has no attribute 'status_code'

    前端AJAX请求数据,提示错误:"AttributeError: 'dict' object has no attribute 'status_code'". 原因:是提示返回对象 ...

  4. Traceback (most recent call last): File AttributeError: 'NoneType' object has no attribute 'group'

    Traceback (most recent call last):File "<stdin>", line 1, in <module> Attribut ...

  5. 解决:AttributeError: ‘Graph‘ object has no attribute ‘number_of_selfloops‘

    解决:AttributeError: 'Graph' object has no attribute 'number_of_selfloops' 目录 解决:AttributeError: 'Grap ...

  6. AttributeError: ‘FPDF‘ object has no attribute ‘unifontsubset‘

    AttributeError: 'FPDF' object has no attribute 'unifontsubset' 目录 AttributeError: 'FPDF' object has ...

  7. AttributeError: ‘Series‘ object has no attribute ‘as_matrix‘

    AttributeError: 'Series' object has no attribute 'as_matrix' 问题: y_test = test_shifted["y_t+1&q ...

  8. AttributeError: ‘SVC‘ object has no attribute ‘_probA‘

    AttributeError: 'SVC' object has no attribute '_probA' 问题: # Save the Modle to file in the current w ...

  9. sklearn使用FeatureHasher处理字符串特征: AttributeError: ‘str‘ object has no attribute ‘items‘

    sklearn使用FeatureHasher处理字符串特征: AttributeError: 'str' object has no attribute 'items' 目录 sklearn使用Fea ...

最新文章

  1. Windows Server 笔记之备份与灾难恢复
  2. 关于eclipse没有http jar的问题解释
  3. Android 功耗(20)---Android后台调度与省电
  4. MTK 驱动开发(30)---Memory 移植
  5. 我为什么不再推荐 RxJava
  6. 昼夜双色导航主题模板 WordPress导航模板
  7. 2017计算机办公自动化试题,2017办公自动化考试试题
  8. python 等频分箱_数据分箱:等频分箱,等距分箱,卡方分箱,计算WOE、IV
  9. IROS 2021最新开源!深度学习三维激光雷达动态物体分割
  10. 【随机过程】【研究生考试专用】备考笔记/知识点整理
  11. python爬虫网页图片显示不出来_网页爬虫 - python下载的图片不显示,无法查看
  12. Photoshop 入门教程「1」如何在Mac版 Photoshop 中打开图像?
  13. Python Requests:两个例子说明get和post方法+用谷歌浏览器查看网络请求
  14. proftpd mysql_ProFTPD的MySQL数据库
  15. 光纤布拉格光栅(FBG)笔记【1】:波导结构和布拉格波长推导
  16. 开源社区“大牛”关于“开源”的大讨论
  17. 云呐容灾备份策略,存储容灾备份系统
  18. 新锐任务宝推广渠道推荐
  19. hdu 6706 huntian oy 杜教筛
  20. IAR 配置ICF跟项目走

热门文章

  1. Android插件化开发指南——实践之Activity转场效果(仿酷狗音乐启动页)
  2. npm和cnpm区别
  3. 双11三连击 之 131个现金红包任性送
  4. html5新增的伪类选择器有,CSS3新增了哪些选择器?(属性、结构伪类、伪元素选择器)...
  5. 【5G PHY】5G SLIV(Start and Length Indicator Value)介绍
  6. Android开发:高仿QQ,发送图片时炫酷的加载效果
  7. VS引用第三方插件CSkin
  8. C Primer Plus 6th Edition第三章编程练习上溢下溢
  9. 只有程序员才会玩的游戏
  10. 推荐 5 款私藏的优质 Chrome 插件(3)