简体   繁体   English

如何导入预训练的 InceptionV4 模型以在 Kaggle 中训练我们的模型?

[英]How to import InceptionV4 model which is pre-trained to train our model in Kaggle?

inputs = Input(shape=(img_dims, img_dims, 3))
from keras.applications.inception_v3 import InceptionV3
base_model = InceptionV3(weights='imagenet',include_top=False,input_shape=(img_dims, img_dims, 3))
x = base_model.output
x = Dropout(0.5)(x)
from keras.layers import GlobalAveragePooling2D
x = GlobalAveragePooling2D()(x)
x = Dense(128,activation='relu')(x)
x = BatchNormalization()(x)
output = Dense(1,activation = 'sigmoid')(x)

How to replace inception v3 with inception v4 and call the required weights?如何用 inception v4 替换 inception v3 并调用所需的权重?

Currently to my knowledge there is no API available to use InceptionV4 in Keras.据我所知,目前没有可用于在 Keras 中使用InceptionV4 API。

Instead, you can create the InceptionV4 network and load the pretrained weights in the created network in this link .相反,您可以在此链接中创建 InceptionV4 网络并在创建的网络中加载预训练权重。

To create InceptionV4 and use it in your code, you can refer the link here.要创建 InceptionV4 并在您的代码中使用它,您可以参考此处的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在实时数据上不断训练我们的预训练模型? - How to continuously train our pre-trained model on real time data? 如何使用我们自己的数据集定制预训练模型? - How to customize a pre-trained model with our own dataset? 当使用TensorFlow slim调整预训练模型时,如何知道要排除或训练的范围? - How to know which scopes to exclude or to train when fine tuning a pre-trained model with TensorFlow slim? 如何删除(弹出)Keras InceptionV3预训练模型的初始层? - How to remove (pop) initial layers of Keras InceptionV3 pre-trained model? 使用预训练模型在张量流中训练新模型 - Using a pre-trained model to train a new model in tensor flow 如何向预训练的对象检测模型添加额外的类并训练它检测所有类(预训练 + 新的)? - How to add additional classes to a pre-trained object detection model and train it to detect all of the classes (pre-trained + new)? 如何加载预训练的 PyTorch model? - How to load a pre-trained PyTorch model? 无法在Tensorflow估算器中训练Keras预训练模型 - Cannot Train Keras Pre-trained Model in Tensorflow Estimator 在迁移学习预训练模型上训练新数据集 - Train new dataset on transfer learning pre-trained model 如何在 tensorflow 中使用预训练的 model 进行预测? - how to predict with pre-trained model in tensorflow?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM