'Loading built-in Python Wrappers in TensorFlow

I'm trying to understand the complete process of exposing the built-in low-level C++ implementations to the Python API in TensorFlow. I've been looking at the source code, and I think I get the big picture, however, there is a step where I get stuck. Here what I made out so far:

(1) TensorFlow uses SWIG to automatically generate Python Wrappers given interface files.

(2) Bazel is used to compile the Python Wrappers into .so libraries

I can't figure out Step (3) which is how/where the .so libraries get loaded into the tensorflow framework so that it is possible to do from tensorflow.python.ops import gen_math_ops in math_ops.py for example.

Appreciate the hints!



Solution 1:[1]

Correct, you may already know the answers. I had the problem installing TF-Agent or GPU version then the error output revales the error message indicated 1. Full Path 2. Compatiblilites.

I am using Windows 10 and Python 3.8, TF, TF-Agent, realted libaries you will have problem install the TF Intel because of the full path name or device compatibilies as Linux behaviour. I do testing and installing that help my understanding when have a new problem.

Hints: Bazel doesn't work with full path in some environment.

Tensorflow Intel

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Martijn Pieters