AttributeError: ‘Model‘ object has no attribute ‘_get_distribution_strategy
生活随笔
收集整理的這篇文章主要介紹了
AttributeError: ‘Model‘ object has no attribute ‘_get_distribution_strategy
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
先參考了以下兩位博主的方法,發現不行:
https://blog.csdn.net/weixin_39653948/article/details/105002087
https://blog.csdn.net/f9547064141/article/details/109022873
?
后仔細看代碼發現:
在類初始化的時候,super里面的參數名和類名不一致,將model改為MobileNet就好了
總結
以上是生活随笔為你收集整理的AttributeError: ‘Model‘ object has no attribute ‘_get_distribution_strategy的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ValueError: This mod
- 下一篇: ResNet50 复现