Open thisiskiru opened 4 years ago
Hi @thisiskiru, I don't know why this error happens. I've tested it in Unix. Maybe it refer to Windows 10 rights, see https://stackoverflow.com/questions/41116270/tensorflow-windows-accessing-folders-deniednewrandomaccessfile-failed-to-creat.
Anyway you can convert tf model from original caffe or pytorch versions. Thx.
I was trying to use pretraind model but, i encounter a lot of errors here is the error:
If using Keras pass *_constraint arguments to layers. Traceback (most recent call last): File "eval.py", line 43, in
saver.restore(sess, args.model)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 1282, in restore
checkpoint_prefix)
ValueError: The passed save_path is not a valid checkpoint: ./model
(tenserflow-gpu) E:\liteflownet-tf2-master>python eval.py --img1=./images/first.png --img2=./images/second.png --flow=./out.flow --display_flow=True 2020-03-13 07:02:56.570752: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-03-13 07:03:00.731236: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2020-03-13 07:03:00.771839: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce RTX 2070 SUPER computeCapability: 7.5 coreClock: 1.77GHz coreCount: 40 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s 2020-03-13 07:03:00.784196: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-03-13 07:03:00.796133: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll 2020-03-13 07:03:00.807408: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll 2020-03-13 07:03:00.816430: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll 2020-03-13 07:03:00.828165: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll 2020-03-13 07:03:00.838064: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll 2020-03-13 07:03:00.852324: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2020-03-13 07:03:00.857583: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0 2020-03-13 07:03:00.861343: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2020-03-13 07:03:00.868849: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce RTX 2070 SUPER computeCapability: 7.5 coreClock: 1.77GHz coreCount: 40 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s 2020-03-13 07:03:00.878764: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-03-13 07:03:00.884640: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll 2020-03-13 07:03:00.890188: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll 2020-03-13 07:03:00.895876: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll 2020-03-13 07:03:00.901838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll 2020-03-13 07:03:00.907615: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll 2020-03-13 07:03:00.913563: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2020-03-13 07:03:00.919343: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0 2020-03-13 07:03:01.573101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-03-13 07:03:01.579850: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0 2020-03-13 07:03:01.584476: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N 2020-03-13 07:03:01.589626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6281 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2070 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5) WARNING:tensorflow:From C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass _constraint arguments to layers. 2020-03-13 07:03:04.969601: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied. ; Input/output error 2020-03-13 07:03:04.999509: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied. ; Input/output error 2020-03-13 07:03:05.006567: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at save_restore_tensor.cc:175 : Data loss: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied. ; Input/output error Traceback (most recent call last): File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1367, in _do_call return fn(args) File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1352, in _run_fn target_list, run_metadata) File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1445, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied. ; Input/output error [[{{node save/RestoreV2}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "eval.py", line 43, in
saver.restore(sess, args.model)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 1290, in restore
{self.saver_def.filename_tensor_name: save_path})
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 960, in run
run_metadata_ptr)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1183, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1361, in _do_run
run_metadata)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1386, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
[[node save/RestoreV2 (defined at eval.py:42) ]]
Original stack trace for 'save/RestoreV2': File "eval.py", line 42, in
saver = tf.train.Saver()
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 828, in init
self.build()
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 878, in _build
build_restore=build_restore)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\ops\gen_io_ops.py", line 1506, in restore_v2
name=name)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 742, in _apply_op_helper
attrs=attr_protos, op_def=op_def)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3322, in _create_op_internal
op_def=op_def)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1756, in init