Python 权重=';吵闹的学生';ValueError:'weights'参数应该是'None'、'imagenet',或者是要加载的权重文件的路径

Python 权重=';吵闹的学生';ValueError:'weights'参数应该是'None'、'imagenet',或者是要加载的权重文件的路径,python,conv-neural-network,valueerror,efficientnet,Python,Conv Neural Network,Valueerror,Efficientnet,我正在使用Google Colab,我想使用EfficientNet嘈杂学生的权重 首先,我通过以下方式安装了该软件包: !pip install git+https://github.com/qubvel/efficientnet 然后我尝试了上面提到的网站上的代码: import efficientnet.keras as eff model = eff.EfficientNetB0(weights='noisy-student') 得到了这个值错误: ValueError: The `

我正在使用Google Colab,我想使用EfficientNet嘈杂学生的权重

首先,我通过以下方式安装了该软件包:

!pip install git+https://github.com/qubvel/efficientnet
然后我尝试了上面提到的网站上的代码:

import efficientnet.keras as eff
model = eff.EfficientNetB0(weights='noisy-student')
得到了这个值错误:

ValueError: The `weights` argument should be either `None` (random initialization), `imagenet` (pre-training on ImageNet), or the path to the weights file to be loaded.

有人知道如何解决这个问题吗?

您可以从下载重量。
然后手动加载,如下所示:

path_to_weights = "/..your..path../efficientnet-b5_noisy-student_notop.h5"
model = EfficientNetB5(include_top=False)
model.load_weights(path_to_weights, by_name=True)

您可以从下载权重。
然后手动加载,如下所示:

path_to_weights = "/..your..path../efficientnet-b5_noisy-student_notop.h5"
model = EfficientNetB5(include_top=False)
model.load_weights(path_to_weights, by_name=True)