elasticai.creator.nn.quantized_grads.fixed_point.quantize_to_fixed_point
#
Module Contents#
Classes#
Round deterministically to nearest neighbour with STE. |
Functions#
Round fixed point half to even. The tensor is clamped and rounded to a fixed point number. |
|
API#
- class elasticai.creator.nn.quantized_grads.fixed_point.quantize_to_fixed_point.Round(*args, **kwargs)[source]#
Bases:
torch.autograd.Function
Round deterministically to nearest neighbour with STE.
Initialization
- elasticai.creator.nn.quantized_grads.fixed_point.quantize_to_fixed_point.round_tensor(x: torch.Tensor) torch.Tensor [source]#
- elasticai.creator.nn.quantized_grads.fixed_point.quantize_to_fixed_point.quantize_to_fxp_hte(number: torch.Tensor, resolution_per_int: torch.Tensor, minimum_as_rational: torch.Tensor, maximum_as_rational: torch.Tensor) torch.Tensor [source]#
Round fixed point half to even. The tensor is clamped and rounded to a fixed point number.