简体   繁体   中英

Pre-Trained Models in Keras,TorchVision

I Have The Following Code which use pre-trained ResNet50 Model in Keras with imagenet DataSet:

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)

and it works fine..My question is can i find a pre-trained model inside Keras or Torchvision or TensorFlow But to one of the following:

1) LeNet5 for MNIST DataSet
2) 32-Layer ResNet for the CIFAR-10 Dataset

I know the alternative is to train the LeNet5 for example on my own, but a pre-trained model will be preferred and as far as I searched I didn't find them. thank you.

I've also been exploring Tensorflow's pretrained model landscape and (as of 1/14/2020), solutions don't exist for 1) a mnist-pretrained lenet or 2) a cifar10-pretrained 32-layer resnet.

Honestly, I strongly doubt that most frameworks release a pretrained model for LeNet-5. It's extremely small and usually takes O(minutes) to train.

Aside from the tf.keras.applications module you mentioned, some other potential options are:

I realize neither of these are ideal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM