Module: tf_quant_finance.utils

Contents

Last updated: 2023-03-16.

Module: tf_quant_finance.utils#

View source

Utilities module.

Functions#

broadcast_common_batch_shape(...): Broadcasts argument batch shapes to the common shape.

broadcast_tensors(...): Broadcasts arguments to the common shape.

common_shape(...): Returns common shape for a sequence of Tensors.

dataclass(...): Creates a data class object compatible with tf.function.

get_shape(...): Returns static shape of x if it is fully defined, or dynamic, otherwise.

iterate_nested(...): Creates an iterator over every leaf value in depth first order.