AutonomicMachineLearning / MLFramework

1 stars 1 forks source link

Could not open. Unknown: New RandomAccessFile failed to Create/Open: Access denied #13

Closed chatterboy closed 5 years ago

chatterboy commented 5 years ago

This error is occurred when used the command below.

python -m tensorflow.python.tools.freeze_graph \
--input_graph=graph-simple.pb \
--input_binary=true \
--output_node_names="out/add" \
--input_checkpoint=ckpt-simple \
--output_graph=frozen.pb
chatterboy commented 5 years ago

This can be solved by modifying the command like below

python -m tensorflow.python.tools.freeze_graph \
--input_graph=graph-simple.pb \
--input_binary=true \
--output_node_names="out/add" \
--input_checkpoint=ckpt-simple/model.ckpt \
--output_graph=frozen-simple.pb

The problem is for a wrong name input_checkpoint. In the input_checkpoint, we have to put a prefix of a name from tf.Saver().

Reference

[1] https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py [2] https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph_test.py [3] https://github.com/tensorflow/models/issues/2676 [4] https://github.com/tensorflow/models/issues/2675