sc2bench.transforms.misc

Functions

default_collate_w_pil(batch)

Puts each data field into a tensor or PIL Image with outer dimension batch size.

register_misc_transform_module(cls)

Registers a miscellaneous transform class.

Classes

AdaptivePad([fill, padding_position, ...])

A transform module that adaptively determines the size of padded sample.

ClearTargetTransform()

A transform module that replaces target with an empty list.

CustomToTensor([converts_sample, ...])

A customized ToTensor module that can be applied to sample and target selectively.

SimpleDequantizer(num_bits)

A module to dequantize quantized tensor in FP32.

SimpleQuantizer(num_bits)

A module to quantize tensor with its half() function if num_bits=16 (FP16) or Jacob et al.'s method if num_bits=8 (INT8 + one FP32 scale parameter).