tfp.experimental.util.JitPublicMethods
Stay organized with collections
Save and categorize content based on your preferences.
Wrapper to compile an object's public methods using XLA.
tfp.experimental.util.JitPublicMethods(
object_to_wrap,
trace_only=False,
methods_to_exclude=tfp.experimental.util.DEFAULT_METHODS_EXCLUDED_FROM_JIT
)
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) .
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`
|
Attributes |
methods_to_exclude
|
|
object_to_wrap
|
|
trace_only
|
|
Methods
copy
View source
copy(
**kwargs
)
__getitem__
View source
__getitem__(
slices
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[]]