<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/util/jit_public_methods.py#L56-L125) |

Wrapper to compile an object's public methods using XLA.

    tfp.experimental.util.JitPublicMethods(
        object_to_wrap,
        trace_only=False,
        methods_to_exclude=https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/util#DEFAULT_METHODS_EXCLUDED_FROM_JIT
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `object_to_wrap` | Any Python object; for example, a `tfd.Distribution` instance. |
| `trace_only` | Python `bool`; if `True`, the object's methods are not compiled, but only traced with [`tf.function(jit_compile=False)`](https://www.tensorflow.org/api_docs/python/tf/function). This is only valid in the TensorFlow backend; in JAX, passing `trace_only=True` will raise an exception. Default value: `False`. |
| `methods_to_exclude` | List of Python `str` method names not to wrap. For example, these may include methods that do not take or return Tensor values. By default, a number of `tfd.Distribution` and `tfb.Bijector` methods and properties are excluded (e.g., `event_shape`, `batch_shape`, `dtype`, etc.). Default value: tfp.experimental.util.DEFAULT_METHODS_EXCLUDED_FROM_JIT\` |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `methods_to_exclude` | <br /> <br /> |
| `object_to_wrap` | <br /> <br /> |
| `trace_only` | <br /> <br /> |

<br />

## Methods

### `copy`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/util/jit_public_methods.py#L98-L101)

    copy(
        **kwargs
    )

### `__getitem__`

[View source](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/util/jit_public_methods.py#L103-L106)

    __getitem__(
        slices
    )