张量流图模型负载

时间:2019-09-06 09:35:30

标签: tensorflow

模型加载失败 我下载了 vgg16_weights.npz 预训练模型,但未加载

    args = parser.parse_args()

    vgg_file = open(args.model_path, 'rb')

    vgg_model = vgg_file.read()
    vgg_file.close()

    graph_def = tf.GraphDef()
    graph_def.ParseFromString(vgg_model)
Traceback (most recent call last):
  File "/Users/weiyangbin/ChineseVQA/extract_fc7.py", line 114, in <module>
    main()
  File "/Users/weiyangbin/ChineseVQA/extract_fc7.py", line 39, in main
    graph_def.ParseFromString(vgg_model)
google.protobuf.message.DecodeError: Error parsing message

0 个答案:

没有答案