mmpretrain.models.utils.to_ntuple¶ mmpretrain.models.utils.to_ntuple(n)¶ A to_tuple function generator. It returns a function, this function will repeat the input to a tuple of length n if the input is not an Iterable object, otherwise, return the input directly. 参数: n (int) – The number of the target length.