module 'torch.nn' has no attribute 'Module'
时间: 2023-10-03 16:05:02 浏览: 48
"module 'torch.nn' has no attribute 'Module'"是一个常见的错误消息,它表示在调用torch.nn模块时出现了错误。具体来说,这个错误是由于拼写错误引起的。正确的写法应该是"torch.nn.Module"而不是"torch.nn.module"。要解决这个错误,只需将代码中的拼写错误修正即可。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [【yolo系列:运行报错AttributeError: module ‘torch.nn‘ has no attribute ‘Mish‘】](https://blog.csdn.net/weixin_47869094/article/details/132260947)[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: 100%"]
[ .reference_list ]