AttributeError: module 'd2l.torch' has no attribute 'load_get_fashion_mnist'
时间: 2023-10-11 07:13:37 浏览: 147
导入FashionMNIST数据集时报错module ‘torchvision.datasets’ has no attribute ‘FashionMNIS’
这个错误是因为在pytorch中没有名为'Dataloader'的属性,所以会抛出AttributeError异常。为了解决这个问题,你需要将代码中的'Dataloader'改为'DataLoader',大小写要保持一致。引用
另外,在中提到的错误是因为在你的代码中找不到'd2l.load_array()'这个函数。你可能需要检查你的代码是否正确导入了d2l库,并且确保你的代码中存在这个函数。
最后,在中提到的错误是因为在torchvision中找不到'load_get_fashion_mnist'这个属性。你可能需要检查你的代码中是否正确导入了torchvision库,并且确保你的代码中存在这个属性。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [解决AttributeError: module ‘torch.utils.data‘ has no attribute ‘Dataloader‘问题](https://blog.csdn.net/weixin_46900108/article/details/122605545)[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: module ‘d2l‘ has no attribute ‘load_array](https://blog.csdn.net/HitStuHan/article/details/129304698)[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* [导入FashionMNIST数据集时报错module ‘torchvision.datasets’ has no attribute ‘FashionMNIS’](https://download.csdn.net/download/weixin_38685832/14036697)[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 ]
阅读全文