MCPcopy Create free account
hub / github.com/aigc3d/LHM / to_tensor

Method to_tensor

engine/SegmentAPI/base.py:184–186  ·  view source on GitHub ↗
(self, order)

Source from the content-addressed store, hash-verified

182 return (self.data / 255.0).astype(np.float64)
183
184 def to_tensor(self, order):
185 data = self.to_numpy(type_mode="float32", order=order)
186 return torch.from_numpy(data)
187
188 def read_image(
189 self,

Callers 3

__getitem__Method · 0.80
__getitem__Method · 0.80
__call__Method · 0.80

Calls 1

to_numpyMethod · 0.95

Tested by

no test coverage detected