AttributeError: 'Namespace' object has no attribute 'cache'
时间: 2023-10-07 18:11:38 浏览: 622
出现AttributeError: 'Namespace' object has no attribute 'cache'的错误是因为在代码中尝试访问一个不存在的属性。根据提供的引用内容,这段代码的问题是缺少'arch'参数。解决方法是使用parser添加'arch'参数。例如,可以在代码中添加以下代码:
parser.add_argument('--arch', default=1, type=float, metavar='M', help='arch') <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [解决AttributeError: ‘Namespace‘ object has no attribute ‘arch](https://blog.csdn.net/m0_47256162/article/details/127861612)[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: 50%"]
- *3* [YOLOV7常见报错问题(1)--AttributeError: ‘Namespace‘ object has no attribute ‘nEpochs](https://blog.csdn.net/weixin_57130167/article/details/126692528)[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: 50%"]
[ .reference_list ]
阅读全文