Utils#
This module contains the loss functions used in the project.
Auto Padding#
Make N tuple#
- fusionlab.utils.make_ntuple(x, n)[source]#
Make n-tuple from input x. If x is an iterable, then we just convert it to tuple. Otherwise, we will make a tuple of length n, all with value of x. reference: pytorch/vision
- Parameters:
x (Any) – input value
n (int) – length of the resulting tuple
- Return type:
Tuple[Any, …]