首页 > 解决方案 > 在 Windows 中的 Tensorflow 上加载经过训练的 ResNet 50 网络

问题描述

我最近开始研究深度学习。我需要在 Windows CPU 上运行使用 Tensorflow 加载的预训练 ResNet50 网络。我在网上的任何地方都找不到结构化的方法。有人可以帮我解决这个问题。

标签: pythontensorflowdeep-learningresnet

解决方案


您必须遵循 tensorflow 网站上的官方“如何进行迁移学习”教程。https://www.tensorflow.org/hub/tutorials/image_retraining

您必须更改的是retrain.py第 1302 行,它将从 tensorflow-hub 加载预训练模型:

default=(
          'https://tfhub.dev/google/imagenet/inception_v3/feature_vector/1'),

对此:

default=(
          'https://tfhub.dev/google/imagenet/resnet_v1_50/feature_vector/1'),

或者您可以查看本网站上的其他预训练模型列表: https ://tfhub.dev/s?module-type=image-feature-vector


推荐阅读