MCPcopy Create free account
hub / github.com/allenai/molmoact2 / extend

Method extend

experiments/olmo/preprocessing/preprocessor_utils.py:54–57  ·  view source on GitHub ↗
(self, n, dim=0)

Source from the content-addressed store, hash-verified

52 assert all(x >= 0 for x in self.shape if x is not None)
53
54 def extend(self, n, dim=0):
55 shape = list(self.shape)
56 shape[dim] += n
57 return TensorSpec(tuple(shape), self.dtype)
58
59 def __mul__(self, other):
60 assert isinstance(other, int)

Callers 15

mainFunction · 0.80
_extract_feature_namesFunction · 0.80
_concatenate_state_statsFunction · 0.80
_action_namesFunction · 0.80
__init__Method · 0.80
encode_depth_codesFunction · 0.80
mainFunction · 0.80
get_messageFunction · 0.80
_iter_exception_chainFunction · 0.80
get_output_shapesMethod · 0.80

Calls 1

TensorSpecClass · 0.85

Tested by 3

test_multidataset_framesFunction · 0.64