[ 仅 API 调用方式不一致 ]torch.min

torch.min

torch.min(*args, **kwargs)

paddle.compat.min

paddle.compat.min(*args, **kwargs)

torch.min 有多种签名与用法,均只需修改 torch 前缀为 paddle.compat,具体如下:

转写示例

# PyTorch 写法
result = torch.min(x)

# Paddle 写法
result = paddle.compat.min(x)