MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / __init__

Method __init__

src/data_loader/transform.py:280–281  ·  view source on GitHub ↗
(self, div=True)

Source from the content-addressed store, hash-verified

278 """ Converts a PIL.Image (RGB) or numpy.ndarray (H x W x C) in the range [0, 255]
279 to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0] """
280 def __init__(self, div=True):
281 self.div = div
282
283 def __call__(self, pic):
284 if isinstance(pic, np.ndarray):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected