当前位置:网站首页>Pytorch GPU yolov5 reports an error
Pytorch GPU yolov5 reports an error
2022-07-28 18:59:00 【code bean】
A wrong :
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
resolvent , modify pytorch Source code :
Lib\site-packages\torch\nn\modules Next, find the file upsampling.py

def forward(self, input: Tensor) -> Tensor:
# return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,
# recompute_scale_factor=self.recompute_scale_factor)
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)Error 2 :
RuntimeError: result type Float can't be cast to the desired output type xxx
yolov5 Under the 【utils Folder 】 Medium 【loss.py】
Two points to be modified ( Annotated code is the previous code , The following is modified ):

The two revised categories are as follows :
anchors, shape = self.anchors[i], p[i].shape # modify ,2022 year 7 month 11 Japan
indices.append((b, a, gj.clamp_(0, shape[2] - 1), gi.clamp_(0, shape[3] - 1))) # image, anchor, grid # modify ,2022 year 7 month 11 Japan 边栏推荐
- The open source of "avoiding disease and avoiding medicine" will not go far
- Special Lecture 6 tree DP learning experience (long-term update)
- kotlin:out in
- Interviewer: what are the usage scenarios of ThreadLocal? How to avoid memory leakage?
- Decimal to binary advanced version (can convert negative numbers and boundary values)
- EasyCVR新版本级联时,下级平台向上传递层级目录显示不全的原因分析
- 湖上建仓全解析:如何打造湖仓一体数据平台 | DEEPNOVA技术荟系列公开课第四期
- What is the future of software testing? How to learn?
- 【实战】用OpenCV实现页面扭曲矫正
- How long does software testing take?
猜你喜欢

One Hot编码是什么?为什么要用它,什么时候用它?

EasyCVR新版本级联时,下级平台向上传递层级目录显示不全的原因分析

LeetCode_ 96_ Different binary search trees

视频融合云服务EasyCVR平台白名单功能如何使用?

EasyNLP中文文图生成模型带你秒变艺术家

Getting started with gateway

我的创作纪念日 -- 2022年7月25日

@The difference between Autowired and @resource

Use the self-developed proxy server to solve the cross domain access errors encountered when uploading files by SAP ui5 fileuploader trial version

Configuration tutorial: how does the organizational structure of the new version of easycvr (v2.5.0) cascade to the superior platform?
随机推荐
What kind of knowledge payment system functions are more conducive to the development of the platform and lecturers?
[R language - basic drawing]
现代化个人博客系统 ModStartBlog v5.4.0 登录界面改版,新增联系方式
Leetcode binary tree class
kotlin:Nothing
我的创作纪念日 -- 2022年7月25日
1.1. Sparse array
A priori, a posteriori, likelihood
EasyCVR设备离线后无法再次上线该如何解决?
Interviewer: what are the usage scenarios of ThreadLocal? How to avoid memory leakage?
112. 使用自开发的代理服务器解决 SAP UI5 FileUploader 上传文件时遇到的跨域访问错误
My creation anniversary -- July 25th, 2022
2022 Hangdian multi school field 2 1011 DOS card (line segment tree)
Two month software testing training scam? How to choose training institutions?
Can zero basis software testing work?
Mongodb initialization
Introduction and advanced level of MySQL (II)
How to solve the problem that the win11 computer camera cannot be seen when it is turned on and the display screen is black?
N32替换STM32,这些细节别忽略!
Getting started with gateway