ModuleNotFoundError: No module named 'tf_slim'
时间: 2023-08-28 10:18:19 浏览: 672
TensorFlow2没有contrib_slim包的问题.pdf
4星 · 用户满意度95%
回答: 出现"ModuleNotFoundError: No module named 'tf_slim'"的错误是因为在代码中使用了"import tf_slim as slim"这行代码,但是没有安装tf_slim模块导致的。你可以尝试使用import tensorflow.contrib.slim as slim这行代码来解决这个问题,以确保正确导入slim模块。另外,还可以参考文末的版本迁移说明来解决其他包的导入问题。 [2<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [不降级解决ModuleNotFoundError: No module named ‘tensorflow.contrib](https://blog.csdn.net/Rex__404/article/details/112798943)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [ModuleNotFoundError: No module named ‘tensorflow.contrib‘ 解决方案](https://blog.csdn.net/dream6985/article/details/131393424)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文