python - 使用 EfficientNetB0 - 错误 - AttributeError:模块 'keras.utils' 没有属性 'get_file'
问题描述
加载高效网络如下:
import efficientnet.keras as efn
from tensorflow.keras import layers
from tensorflow.keras import Model
base_model = efn.EfficientNetB0(input_shape = (224, 224, 3), include_top = False)
并得到以下错误:
AttributeError:模块“keras.utils”没有属性“get_file”
解决方案
上面发布的代码仍然无法正常工作。所以,现在使用一种解决方法 -
import efficientnet.tfkeras as efn
base_model = efn.EfficientNetB6(input_shape = (224, 224, 3), include_top = False)
推荐阅读
- r - csv格式的多元时间序列的R解释
- android - 从 Fragment 调用 Hilt-Dagger ViewModel
- sql - SQL 优化 - 对 Joined 查询中的每个不同 id 仅执行一次函数
- python - 找不到模型“en_core_web_md”。它似乎不是快捷链接、Python 包或数据目录的有效路径
- c++ - 使用模板函数指针数组
- android - gradlew assembleRelease 不适用于 react-native-camera
- java - 是否可以在以 adb 启动的 Java 服务中创建活动?
- ssh - Windows 10 上的错误“getsockname failed: Not a socket”
- github - 如何接受 GitHub 上的私有存储库所有权?
- webrtc - 转服务器中继端口在严格的防火墙中被阻止