当前位置:网站首页>MMdet的Resnet卷积替换成Ghost卷积组所出现的问题
MMdet的Resnet卷积替换成Ghost卷积组所出现的问题
2022-06-29 10:44:00 【故乡的云和星星】
1.SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in pos
此问题的意思是python中对“\”有定义,修改的代码有文件路径中如过包含这个符号 很有可能是当成转义字符了,我是因为从网上复制的注释导致的错误。
2.TypeError: FasterRCNN: ResNet: __init__() got an unexpected keyword argument‘dw_size’
出现这个错误是提示你出现意外的字符,一般该报错是因为环境中的protoc 版本与python版本不符,所以可以直接在终端窗口输入以下命令重新装protoc:
pip install -U protobuf我出现这个错误是因为没有定义dw_size这个参数,修改后即可。
3.ValueError: FasterRCNN: ResNet: out_channels must be divisible by groups
出现这个错误是因为你分组的时候无法整除输入和输出通道数,必须能整除才行 。详细讲解可以看一下这位大佬的文章:
python基础教程:对pytorch的函数中的group参数的作用介绍_程序员牡蛎的博客-CSDN博客
https://blog.csdn.net/chengxun03/article/details/1054442234.RuntimeError: Given groups=1, weight of size 32 3 3 3, expected input[1, 224, 224, 3]
还是衔接上面的问题,出现这个问题大概率是因为分组的数不能整除
5.RuntimeError: Sizes of tensors must match except in dimension 2. Got 198 and
出现这个问题是因为我使用的expand_as这个方法了,导致两个张量维度不同,另外expand_as只能扩展一维的或者n行1列的。
6. RuntimeError: The expanded size of the tensor (272) must match the existing
和问题5一致,我出现这个问题是因为padding那里用错了数,不能直接给整数,可以用3//2,这样不会形成272和270
7.pytorch怎么看张量的各种数据啥的
可以看一下这个大佬的:
【pyTorch基础】(1) 张量的数据类型_立Sir的博客-CSDN博客_张量的数据类型
https://blog.csdn.net/dgvv4/article/details/1241948838.RuntimeError: running_mean should contain 32 elements not 64
在做卷积操作的时候,步长改为2后,尺寸大小未对应好。通过各种print了解了详细过程。
9. ResNet: 'list' object attribute 'append' is read-only
result.append('Senior'),不需要等号,使用append的时候后面不能带“=”。
10.'Bottleneck' object has no attribute 'convs'
说的是残差块里面没有属性convs,是因为我不小心注释了。
11.PyTorch中的contiguous解读
期间学习了这个方法的原理,详情看大佬的文章:
12.Sizes of tensors must match except in dimension 2. Got 50 and 100
和上面出的问题一样,因为没对应好conv3的输入通道数,修改掉即可。
# width * scales,2022
self.conv3 = build_conv_layer(
self.conv_cfg,
out1111_channels,
self.planes * self.expansion,
kernel_size=1,
bias=False)出现了如此多的问题后,自己进行了查询并解决,发现将resnet和ghostnet了解的基本差不多了,可能解决问题的过程就是提升的过程。
有同学也想将resnet网络中的普通卷积替换成Ghost分组卷积,可以在评论区交流。
边栏推荐
- The first "cyborg" in the world died, and he only transformed himself to "change his life against the sky"
- Limit introduction summary
- Add notification announcements to send notifications to online users
- 基于鲲鹏开发套件实现x86平台到Kunpeng平台的源码迁移【玩转华为云】
- The necessary operation for those big guys to fly 666 inadvertently at the bash command line terminal
- Qt学习11 Qt 中的字符串类
- [NLP] text generation topic 1: basic knowledge
- Google Earth engine (GEE) - Gedi L2a vector canopy top height (version 2) global ecosystem data set
- Creating postgre enterprise database by ArcGIS
- (JS) handwritten deep copy
猜你喜欢

Course design for the end of the semester: product sales management system based on SSM

【毕业季】总结过去,展望未来

Bs-gx-018 student examination system based on SSM

Modbustcp protocol WiFi wireless learning single channel infrared module (round shell version)

Good news | Haitai Fangyuan has passed the cmmi-3 qualification certification, and its R & D capability has been internationally recognized

【每日3题(1)】判断国际象棋棋盘中一个格子的颜色

微博评论架构设计
![Leetcode 535 encryption and decryption of tinyurl [map] the leetcode road of heroding](/img/76/709bbbbd8eb01f32683a96c4abddb9.png)
Leetcode 535 encryption and decryption of tinyurl [map] the leetcode road of heroding

Nature | 全球海洋微生物组的生物合成潜力

Oracle NetSuite 助力 TCM Bio,洞悉数据变化,让业务发展更灵活
随机推荐
MATLAB basic Max to find the maximum value of one-dimensional or two-dimensional array +sleep (pause)
云原生开发必备:首个通用无代码开发平台 iVX 编辑器
Good news | Haitai Fangyuan has passed the cmmi-3 qualification certification, and its R & D capability has been internationally recognized
Getting started with the lvgl Library - Animation
Cornerstone of efficient remote office: effective communication | community essay solicitation
Modbustcp protocol WiFi wireless learning single channel infrared module (round shell version)
Qt学习16 Qt 对象间的父子关系
Hit the industry directly! The first model selection tool in the industry was launched by the flying propeller
The Chinese Computational Linguistics Conference and the national knowledge atlas and Semantic Computing Conference are in full swing
The former security director of Uber faced fraud allegations and concealed the data leakage event
关于IP定位查询接口的测评Ⅱ
Qt学习15 用户界面与业务逻辑的分离
(JS) array de duplication
斐波那锲数列与冒泡排序法在C语言中的用法
Qt学习08 启航!第一个应用实例
XML外部实体注入漏洞(一)
Thoroughly understand JVM Series 7: what is the flow process of objects in the generational model?
Exclusive interview with CTO: the company has deepened the product layout and accelerated the technological innovation of domestic EDA
Doodle cloud development demo login
When a technician becomes a CEO, what "bugs" should be modified?