我的代码试图将不同的文件作为输入并预测它们的语言。这是我每次运行主文件时都会遇到的错误。起初,我以为这是输出路径的问题,但到目前为止,我已经检查了我编写的所有代码文件并检查了所有路径,似乎这不是问题所在。现在我无法推断出这个错误的实际含义。请帮助我。
2022-11-25 16:53:52.060639: W tensorflow/core/common_runtime/forward_type_inference.cc:332] Type inference failed. This indicates an invalid graph that escaped type checking. Error message: INVALID_ARGUMENT: expected compatible input types, but input 1:
type_id: TFT_OPTIONAL
args {
type_id: TFT_PRODUCT
args {
type_id: TFT_TENSOR
args {
type_id: TFT_INT64
}
}
}
is neither a subtype nor a supertype of the combined inputs preceding it:
type_id: TFT_OPTIONAL
args {
type_id: TFT_PRODUCT
args {
type_id: TFT_TENSOR
args {
type_id: TFT_INT32
}
}
}
while inferring type of node 'dnn/zero_fraction/cond/output/_18'
2022-11-25 16:53:54.402348: W tensorflow/core/framework/op_kernel.cc:1780] OP_REQUIRES failed at save_restore_v2_ops.cc:112 : NOT_FOUND: Failed to create a NewWriteableFile: C:/Users/vs889/Desktop/project/outputs\model.ckpt-0_temp\part-00000-of-00001.data-00000-of-00001.tempstate6886965226105612622 : The system cannot find the path specified.
; No such process
Traceback (most recent call last):
File "C:\Users\vs889\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1378, in _do_call
return fn(*args)
File "C:\Users\vs889\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1361, in _run_fn
return self._call_tf_sessionrun(options, feed_dict, fetch_list,
File "C:\Users\vs889\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\session.py", line 1454, in _call_tf_sessionrun
return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a NewWriteableFile: C:/Users/vs889/Desktop/project/outputs\model.ckpt-0_temp\part-00000-of-00001.data-00000-of-00001.tempstate6886965226105612622 : The system cannot find the path specified.
; No such process
[[{{node save/SaveV2}}]]
1条答案
按热度按时间carvr3hs1#
也许你命名文件和路径的方式使windows无法识别文件位置。你可以在linux上运行来测试。你应该同意在Windows上使用“\”并避免使用“-”符号。