我想保存我的卷积神经模型,但我有这个错误
Exporting trained model to b'ConvNet.py\\1'
Traceback (most recent call last):
File "ConvNet.py", line 285, in <module>
builder = saved_model_builder.SavedModelBuilder(export_path)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 90, in __init__
file_io.recursive_create_dir(self._export_dir)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 367, in recursive_create_dir
pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status)
File "C:\Program Files\Python36\lib\contextlib.py", line 88, in __exit__
next(self.gen)
File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ConvNet.py\\1
以下是我使用
的代码部分export_path_base = sys.argv[-1]
export_path = os.path.join(
compat.as_bytes(export_path_base),
compat.as_bytes(str(1)))
print ('Exporting trained model to', export_path)
builder = saved_model_builder.SavedModelBuilder(export_path)
classification_inputs = utils.build_tensor_info(serialized_tf_example)
classification_outputs_classes = utils.build_tensor_info(prediction_classes)
classification_outputs_scores = utils.build_tensor_info(values)