cerebras.modelzoo.data.vision.segmentation.transforms.utility_transforms.NumpyToTensor#

class cerebras.modelzoo.data.vision.segmentation.transforms.utility_transforms.NumpyToTensor[source]#

Bases: object

Utility function for pytorch. Converts data (and seg) numpy ndarrays to pytorch tensors :param cast_to [list]: images will be cast to cast_to[0], targets will be cast to cast_to[1].

Methods

__init__(cast_to=None)[source]#

Utility function for pytorch. Converts data (and seg) numpy ndarrays to pytorch tensors :param cast_to [list]: images will be cast to cast_to[0], targets will be cast to cast_to[1].

__call__(**data_dict)[source]#

Call self as a function.