1
votes

I am trying to covert pb file to tlite file using the below command:

bazel run //tensorflow/contrib/lite/toco:toco --input_file=sample.pb --output_file=sample.tlite

I am getting the below error: Error: Skipping //tensorflow/contrib/lite/toco:toco: Build file not found on package path.

I have tensorflow and toco installed under Python folder. What is the right path to be given for Bazel run command?

1

1 Answers

3
votes

Having toco installed in python doesn't work. You have to execute this command in the tensorflow source directory. See https://www.tensorflow.org/install/install_sources for the necessary instructions regarding dependencies and configuration.

Also note that you'll need a "--" between the bazel args and the command args:

bazel run //tensorflow/contrib/lite/toco:toco -- --input_file=sample.pb --output_file=sample.tlite