1

我正在使用 Google Colab,我想使用 EfficientNet Noisy Student 的权重。https://www.kaggle.com/c/bengaliai-cv19/discussion/132894

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

!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.

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

4

1 回答 1

0

你可以从这里下载权重。
并像这样手动加载它:

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)
于 2020-10-04T17:27:31.750 回答