(tensor: tf.Tensor)
| 36 | |
| 37 | |
| 38 | def to_padding(tensor: tf.Tensor) -> tf.Tensor: |
| 39 | if tf.debugging.is_numeric_tensor(tensor): |
| 40 | return tf.zeros_like(tensor) |
| 41 | elif tensor.dtype == tf.string: |
| 42 | return tf.fill(tf.shape(tensor), "") |
| 43 | else: |
| 44 | raise ValueError(f"Cannot generate padding for tensor of type {tensor.dtype}.") |
| 45 | |
| 46 | |
| 47 | # Defines supported normalization schemes for action and proprioceptive state. |
no outgoing calls
no test coverage detected