xceeds the number of elements along that axis. Previously, python's min() function was used to determine whether to use the provided k-value or the specified dim axis value. However, in cases where the model is being exported in tracing mode, python min() is static causing the model to be traced incorrectly and eventually fail at the topk node. In order to avoid this situation, in tracing mode, torch.min() is used instead. Args: input (Tensor): The original input tensor. orig_kval (int): The provided k-value. axis(int): Axis along which we retrieve the input size. Returns: min_kval (int): Appropriately selected k-value. r