【问题标题】:Pre-Trained Models in Keras,TorchVisionKeras、TorchVision 中的预训练模型
【发布时间】:2019-03-06 19:25:53
【问题描述】:

我有以下代码在 Keras 中使用预训练的 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,但预训练模型将是首选,据我搜索,我没有找到它们。 谢谢。

【问题讨论】:

    标签: python tensorflow keras deep-learning pytorch


    【解决方案1】:

    我还一直在探索 Tensorflow 的预训练模型环境,并且(截至 2020 年 1 月 14 日),1) mnist 预训练的 lenet 或 2) cifar10 预训练的 32 层 resnet 的解决方案不存在。

    老实说,我强烈怀疑大多数框架是否发布了用于 LeNet-5 的预训练模型。它非常小,通常需要 O(分钟)来训练。

    除了您提到的tf.keras.applications 模块,其他一些可能的选择是:

    我意识到这些都不理想。

    【讨论】:

      猜你喜欢
      • 2020-12-05
      • 1970-01-01
      • 2018-04-15
      • 2019-01-20
      • 1970-01-01
      • 2017-06-05
      • 2018-07-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多