MCPcopy Create free account
hub / github.com/MichaelRamamonjisoa/SharpNet / ToTensor

Class ToTensor

data_transforms.py:268–313  ·  view source on GitHub ↗

Converts a PIL.Image or numpy.ndarray (H x W x C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0].

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

eval.pyFile · 0.90
get_np_predsFunction · 0.85
get_pred_from_inputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected