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

Method extend

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

Source from the content-addressed store, hash-verified

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

Callers 15

mainFunction · 0.80
get_messageFunction · 0.80
get_output_shapesMethod · 0.80
packFunction · 0.80
downloadMethod · 0.80
loadMethod · 0.80
downloadMethod · 0.80
list_sourcesFunction · 0.80
get_image_filesFunction · 0.80
get_key_subresponsesFunction · 0.80
parse_open_responseFunction · 0.80

Calls 1

TensorSpecClass · 0.85

Tested by

no test coverage detected