I am trying to compile the quantization script as described in Pete Warden's blog. However I get the following error message after running the following bazel build:
bazel build tensorflow/contrib/quantization/tools:quantize_graph
ERROR: no such package 'tensorflow/contrib/quantization/tools': BUILD file not found on package path.
INFO: Elapsed time: 0.277s
I think what happened is that this quantization tool got moved out of contrib and into TensorFlow core. You should be able to use that instead:
bazel build tensorflow/tools/quantization:quantize_graph
Related
I'm trying compiling Tensorflow 1.15 on Odroid-XU4 and getted some error that seems not related and exclusive to my platform. I installed Tensorflow 1.13 by source compile successfully. But for TF1.15 I got some error which experienced when use TF1.15.0 and TF1.15.1 and TF1.15.3.
My command to build using Bazel 0.26.1 is:
bazel --output_base=/media/odroid/.../CacheFolder build --config=opt --config=monolithic --config=noaws --jobs 1 --define=grpc_no_ares=true --local_resources 1536,0.5,1.0 tensorflow:libtensorflow_cc.so --discard_analysis_cache
After getting error for package "#io_rules_docker" which fixed by adding manually in WORKSPACEFILE and some same error I got this error:
>no such package '#highwayhash//': BUILD file not found on package path and referenced by '//tensorflow/core/platform/default/build_config:platformlib'
How can I solve this?
I need to compile Tensorflow from source for compute capability 3.0
I was compiling Tensorflow and I got this error after 6 hours of compiling:
cache/bazel/_bazel_maydin/435ff134a8a529ccec16636685173684/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_2_tf_python_api_gen_v2.runfiles/org_tensorflow/tensorflow/python/keras/preprocessing/__init__.py", line 21, in <module>
import keras_preprocessing
ModuleNotFoundError: No module named 'keras_preprocessing'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 20674.165s, Critical Path: 247.43s
INFO: 12297 processes: 12297 local.
FAILED: Build did NOT complete successfully
In below link, I found this answer and I think it will work.
Error Compiling Tensorflow From Source - No module named 'keras_applications'
pip install keras_applications==1.0.4 --no-deps
pip install keras_preprocessing==1.0.2 --no-deps
pip install h5py==2.8.0
I also got similar error before beginning of build where it says numpy is missing, i just installed it via pip and build started without problem.
But I am scared to run build command again. Because I don't want to compile everything 6 hours again.
If I start building again does it start all over from beginning or it continue from where it failed?
Build command I used is this:
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
I cloned tensorflow repository, checkout to branch 2.0 and started build.
Additional info about system:
Cuda 10.0.130
cuDNN 7.6.2
Bazel 0.26.1
Ubuntu 18.04
It resumes compiling where it left off after fixing errors.
hey guys im trying to install tensorflow
c++ on windows 10 but im running into this
issue when i try to do the bazel command
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
As a basic sanity check to resolve your problem, you need to make sure you are running a specific version of TensorFlow using the recommended bazel build tool as specified in the instructions:
https://www.tensorflow.org/install/source
For example, TensorFlow v0.9 should go with Bazel tool v0.11.0. Could you provide this information for you case ?
I am trying to build TensorFlow cpu only r1.11 from source on a Debian OS following this tutorial: https://www.tensorflow.org/install/source
I installed bazel as indicated using this tutorial https://docs.bazel.build/versions/master/install-ubuntu.html from the binary installer as recommended.
Then I followed each step and everything worked fine until this command:
bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...
It shows me this error:
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '#io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
INFO: Elapsed time: 0.088s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
I read online that this is likely related to bazel. So I tried reinstalling bazel using the Using Bazel custom APT repository but I got the same error.
As of version 1.12.0, TensorFlow uses some deprecated Bazel features that are being completely dropped in recent versions of Bazel. Instead of using the most recent version, try using an older one for now. I was able to build TensorFlow 1.12.0 on Windows using Bazel 0.18.1, most likely that should work with TensorFlow 1.11 too.
I agree with #jdehesa. Even I was struggling to build the tensorflow using from scratch. I tried different versions, 0.26,0.21,0.19.1 and finally it worked with 0.18.1. So, it is a bazel issue rather than Tensorflow. TF_version=1.12.0
I am testing a Movidius Neural Compute stick.
My first test is to replicate this guide with Inception_v4 model:
https://movidius.github.io/ncsdk/tf_modelzoo.html
I do need to know the "output_node_name" for the freeze_graph.py.
I have found instructions to do so in tensorflow docs:
bazel build tensorflow/tools/graph_transforms:summarize_graph
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=MY_PB_FILE.pb
However, when trying to follow steps, I get the following error:
lberto#alberto-OptiPlex-9010:~/movidius_ws$ bazel build tensorflow/tools/graph_transforms:summarize_graph
Starting local Bazel server and connecting to it...
ERROR: Skipping 'tensorflow/tools/graph_transforms:summarize_graph': no such package 'tensorflow/tools/graph_transforms': BUILD file not found on package path
WARNING: Target pattern parsing failed.
ERROR: no such package 'tensorflow/tools/graph_transforms': BUILD file not found on package path
INFO: Elapsed time: 0.947s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
According to the guide provided by Movidius, it is not necessary to install tensorflow in the host, only download the source code. I have cloned the Tensorflow source code in a directory to follow the guide, and the movidius tools in a docker container sharing that directory.
What am I doing wrong building the summarize_graph application?
I need to have this application running to know the output_node_names that I want to use with the movidius neural compute stick
Thank you.
Make sure the following files exist:
"~/movidius_ws/WORKSPACE"
"~/movidius_ws/tensorflow/tools/graph_transforms/BUILD" or "~/movidius_ws/tensorflow/tools/graph_transforms/BUILD.bazel"
If they do, check the list of targets in the "//tensorflow/tools/graph_transforms" package:
bazel query //tensorflow/tools/graph_transforms:*
and see if "summarize_graph" is there.