pixano_inference.frameworks.tensorflow
TensorFlow framework adapter.
Provides framework-neutral device/dtype resolution and numpy interchange for custom models written in TensorFlow. TensorFlow is imported lazily; importing this module does not require it.
TensorFlowAdapter
:class:~pixano_inference.frameworks.base.FrameworkAdapter for TensorFlow.
from_numpy(array, device=None, dtype=None)
Convert a numpy array to a TensorFlow tensor on device with dtype.
Source code in pixano_inference/frameworks/tensorflow.py
is_available()
resolve_device(num_gpus)
Return a TensorFlow device string ("/GPU:0" when requested and present).
Source code in pixano_inference/frameworks/tensorflow.py
resolve_dtype(dtype)
Resolve a tf.DType from a string (e.g. "float32", "bfloat16").