Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Tensorflow.restore中输入的格式_Python_Python 3.x_Tensorflow_Tensorflow2.0 - Fatal编程技术网

Python Tensorflow.restore中输入的格式

Python Tensorflow.restore中输入的格式,python,python-3.x,tensorflow,tensorflow2.0,Python,Python 3.x,Tensorflow,Tensorflow2.0,我使用的模型中的一个参数是以下文件,该文件以名称checkpoint(无扩展名)传递: 模型检查点路径:“epoch-29” 所有模型检查点路径:“epoch-29” 它用于以下代码段中: parser = argparse.ArgumentParser() parser.add_argument('--checkpoint', help='path to checkpoint to restore',default='epoch') args = parser.parse_arg

我使用的模型中的一个参数是以下文件,该文件以名称checkpoint(无扩展名)传递:

模型检查点路径:“epoch-29”

所有模型检查点路径:“epoch-29”

它用于以下代码段中:

parser = argparse.ArgumentParser()     
parser.add_argument('--checkpoint', help='path to checkpoint to restore',default='epoch')


args = parser.parse_args()
    

# load config
config = generate_config()

# build model and restore from checkpoint
model = build_model(num_output_neurons=config.n_output_neurons, y_input=config.n_mels, num_units=config.n_dense_units, num_filts=config.n_filters)

checkpoint = tf.train.Checkpoint(model=model)
checkpoint.restore(args.checkpoint)
我得到以下错误:

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ...: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
方法还原的正确格式是什么?

检查注释