MCPcopy Create free account
hub / github.com/allenai/molmo2 / VariablePaddingSpec

Class VariablePaddingSpec

olmo/preprocessing/preprocessor_utils.py:101–108  ·  view source on GitHub ↗

Indicates a key can have a variable shape after collation

Source from the content-addressed store, hash-verified

99
100@dataclasses.dataclass
101class VariablePaddingSpec:
102 """Indicates a key can have a variable shape after collation"""
103
104 shape: Tuple[int]
105 """Shape of padding tensor if key is not in batch and padding is required"""
106
107 dtype: np.dtype
108 """dtype of padding tensor if the key is not in batch and padding is required"""
109
110
111def batch_pixels_to_patches(array, patch_size):

Callers 2

get_output_shapesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected