Optimizing the frozen graph
You need to build the tool inside the tensorflow directory, not the model directory, and then run the tool on the model.
I have frozen the tensorflow graph and I have noticed that the using the graph in realtime for prediction is too slow. so I would like to do graph optimization.
Within my project file, I have got a folder called model which contains the model file (pb file).
Now I tried running the following command inside the model dir

 bazel build tensorflow/python/tools:strip_unused

But it is firing the following error,

bazel build tensorflow/python/tools:strip_unused
  ERROR: no such package 'tensorflow/python/tools': BUILD file not found on package path.