object has no attribute '{}'".format( AttributeError: 'MyAlexNet' object has no attribute 'ReLU'
时间: 2023-10-08 08:12:32 浏览: 99
这个错误提示是说在'MyAlexNet'对象中没有'ReLU'属性。根据引用中提到的解决方法,这种错误通常发生在将别人的模型替换成自己的模型时。可能的解决方法是检查模型的定义或初始化部分,确保'ReLU'层被正确地添加到模型中。另外,还可以检查模型的命名空间,以确保没有命名冲突导致属性找不到的错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [错误提示:torch.nn.modules.module.ModuleAttributeError: ‘Unet‘ object has no attribute ‘co](https://blog.csdn.net/qq_34419607/article/details/110347137)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [AttributeError: ‘NoneType’ object has no attribute ‘data’](https://blog.csdn.net/happyeveryday62/article/details/104215273)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [python报错: list object has no attribute shape的解决](https://download.csdn.net/download/weixin_38748721/13708867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文