[英]Pre-Trained Models in Keras,TorchVision
我有以下代碼,它在ResNet50
使用預訓練的ResNet50
模型和imagenet
:
from keras.applications.resnet50 import ResNet50
from keras.preprocessing import image
from keras.applications.resnet50 import preprocess_input, decode_predictions
import numpy as np
model = ResNet50(weights='imagenet')
print(model)
並且它工作正常..我的問題是我可以在 Keras、Torchvision 或 TensorFlow 中找到一個預先訓練的模型,但可以使用以下方法之一:
1) LeNet5 for MNIST DataSet
2) 32-Layer ResNet for the CIFAR-10 Dataset
我知道替代方法是例如自己訓練 LeNet5,但預訓練模型將是首選,據我搜索,我沒有找到它們。 謝謝你。
我還一直在探索 Tensorflow 的預訓練模型格局,並且(截至 2020 年 1 月 14 日),對於 1)mnist 預訓練的 lenet 或 2)cifar10 預訓練的 32 層 resnet 不存在解決方案。
老實說,我強烈懷疑大多數框架都發布了 LeNet-5 的預訓練模型。 它非常小,通常需要 O(分鍾) 來訓練。
除了你提到的tf.keras.applications
模塊,其他一些潛在的選擇是:
tensorflow/models
存儲庫,其中包含mnist和32 層 resnet 的模型示例pytorch
,它具有在 imagenet 上預訓練的各種模型我意識到這兩個都不理想。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.