导入xView TF基线检查点文件时出现Unicode解码错误

2024-04-24 17:29:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图从这里微调xView模型:https://github.com/DIUx-xView/baseline/releases

import tensorflow as tf
import os

checkpoint_meta_path = os.path.join("vanilla", "vanilla-ckpt.meta")
checkpoint_files = os.path.join("vanilla", "vanilla-ckpt")

graph = tf.Graph()
with graph.as_default():
    with tf.Session() as sess:
        saver = tf.train.import_meta_graph(checkpoint_meta_path)

但我得到了这个错误:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 41: invalid start byte

我做错了什么?或者这些文件是如何保存的?GitHub上的这个问题似乎表明应该存在一个检查点文件,并且它可能导致这个问题,但是这个文件不是由xView提供的:https://github.com/tensorflow/tensorflow/issues/19573


Tags: 文件pathhttpsimportgithubcomostf