<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/auto_batching/__init__.py) |

TensorFlow Probability auto-batching package.

## Modules

[`allocation_strategy`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/allocation_strategy) module: Live variable analysis.

[`dsl`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/dsl) module: Python-embedded DSL frontend for authoring autobatchable IR programs.

[`frontend`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/frontend) module: AutoGraph-based auto-batching frontend.

[`instructions`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions) module: Instruction language for auto-batching virtual machine.

[`liveness`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/liveness) module: Live variable analysis.

[`lowering`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/lowering) module: Lowering the full IR to stack machine instructions.

[`numpy_backend`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/numpy_backend) module: Numpy backend for auto-batching VM.

[`stack_optimization`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/stack_optimization) module: Optimizing stack usage (pushes and pops).

[`stackless`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/stackless) module: A stackless auto-batching VM.

[`tf_backend`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/tf_backend) module: TensorFlow (graph) backend for auto-batching VM.

[`type_inference`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/type_inference) module: Type inference pass on functional control flow graph.

[`virtual_machine`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/virtual_machine) module: The auto-batching VM itself.

[`xla`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/xla) module: XLA utilities.

## Classes

[`class Context`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/Context): Context object for auto-batching multiple Python functions together.

[`class NumpyBackend`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/NumpyBackend): Implements the Numpy backend ops for a PC auto-batching VM.

[`class TensorFlowBackend`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/TensorFlowBackend): Implements the TF backend ops for a PC auto-batching VM.

[`class TensorType`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/TensorType): TensorType(dtype, shape)

[`class Type`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/Type): Type(tensors,)

## Functions

[`truthy(...)`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/truthy): Normalizes Tensor ranks for use in `if` conditions.