MCPcopy Create free account
hub / github.com/SpatialVLA/SpatialVLA / to_padding

Function to_padding

data/utils/data_utils.py:38–44  ·  view source on GitHub ↗
(tensor: tf.Tensor)

Source from the content-addressed store, hash-verified

36
37
38def 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.

Callers 1

delete_task_conditioningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected