| @@ -391,8 +391,71 @@ ALL_UNSUPPORTED = NN_UNSUPPORTED + F_UNSUPPORTED + TORCH_DOT_UNSUPPORTED + TENSO | |||
| UNSUPPORTED_WARN_INFOS = { | |||
| "nn.AdaptiveAvgPool2d": "maybe could convert to P.ReduceMean", | |||
| "nn.AvgPool1d": "maybe could convert to nn.AvgPool1d", | |||
| "nn.ConvTranspose2d": "maybe could convert to nn.Conv2dTranspose", | |||
| "nn.CrossEntropyLoss": "maybe could convert to nn.SoftmaxCrossEntropyWithLogits", | |||
| "nn.Embedding": "maybe could convert to nn.Embedding", | |||
| "nn.GroupNorm": "maybe could convert to nn.GroupNorm", | |||
| "nn.MSELoss": "maybe could convert to nn.MSELoss", | |||
| "nn.LSTM": "maybe could convert to nn.LSTM", | |||
| "nn.LSTMCell": "maybe could convert to nn.LSTMCell", | |||
| "nn.ModuleList": "maybe could convert to nn.CellList", | |||
| "nn.SmoothL1Loss": "maybe could convert to nn.SmoothL1Loss", | |||
| "nn.Tanh": "maybe could convert to nn.Tanh", | |||
| "nn.Upsample": "maybe could convert to P.ResizeBilinear", | |||
| "nn.L1Loss": "maybe could convert to nn.L1Loss", | |||
| "nn.Parameter": "maybe could convert to mindspore.Parameter", | |||
| "nn.ParameterList": "maybe could convert to mindspore.ParameterTuple", | |||
| "nn.Unfold": "maybe could convert to nn.Unfold", | |||
| "nn.PixelShuffle": "maybe could convert to P.DepthToSpace", | |||
| "F.adaptive_avg_pool2d": "maybe could convert to P.ReduceMean", | |||
| "F.conv2d": "maybe could convert to mindspore.ops.operations.Conv2D", | |||
| "F.dropout": "please use nn.Dropout in __init__()", | |||
| "F.interpolate": "maybe could convert to P.ResizeBilinear", | |||
| "torch.bmm": "maybe could convert to P.BatchMatMul", | |||
| "torch.cumsum": "maybe could convert to P.CumSum", | |||
| "F.relu": "maybe could convert to P.ReLU", | |||
| "F.pad": "maybe could convert to P.Pad", | |||
| "F.softmax": "maybe could convert to P.Softmax", | |||
| "torch.clamp": "maybe could convert to mindspore.ops.composite.clip_by_value", | |||
| "torch.eq": "maybe could convert to P.Equal", | |||
| "torch.load": "maybe could convert to mindspore.train.serialization.load_checkpoint", | |||
| "torch.matmul": "maybe could convert to P.MatMul", | |||
| "torch.max": "try to use P.ArgMaxWithValue, notice that two values are returned by P.ArgMaxWithValue", | |||
| "torch.min": "try to use P.ArgMinWithValue, notice that two values are returned by P.ArgMinWithValue" | |||
| "torch.mean": "maybe could convert to P.ReduceMean", | |||
| "torch.min": "try to use P.ArgMinWithValue, notice that two values are returned by P.ArgMinWithValue", | |||
| "torch.mm": "maybe could convert to P.MatMul", | |||
| "torch.mul": "maybe could convert to P.Mul", | |||
| "torch.norm": "maybe could convert to nn.Norm", | |||
| "torch.numel": "maybe could convert to P.Size", | |||
| "F.one_hot": "maybe could convert to P.OneHot", | |||
| "torch.ones_like": "maybe could convert to P.OnesLike", | |||
| "torch.randn": "maybe could convert to P.TruncatedNormal", | |||
| "torch.round": "maybe could convert to P.Round", | |||
| "torch.save": "maybe could convert to mindspore.train.serialization.save_checkpoint", | |||
| "torch.sigmoid": "maybe could convert to P.Sigmoid", | |||
| "torch.split": "maybe could convert to P.Split", | |||
| "torch.squeeze": "maybe could convert to P.Squeeze", | |||
| "torch.stack": "maybe could convert to P.Pack", | |||
| "torch.sum": "maybe could convert to mindspore.ops.operations.ReduceSum", | |||
| "torch.tanh": "maybe could convert to mindspore.ops.operations.Tanh", | |||
| "torch.tensor": "maybe could convert to mindspore.Tensor", | |||
| "torch.transpose": "maybe could convert to P.Transpose", | |||
| "torch.unsqueeze": "maybe could convert to P.ExpandDims", | |||
| "torch.zeros_like": "maybe could convert to P.ZerosLike", | |||
| ".chunk": "maybe could convert to P.Split", | |||
| ".fill_": "maybe could convert to P.Fill", | |||
| ".float": "maybe could convert to P.Cast", | |||
| ".mm": "maybe could convert to P.MatMul", | |||
| "mul": "maybe could convert to P.Mul", | |||
| ".pow": "maybe could convert to P.Pow", | |||
| ".round": "maybe could convert to P.Round", | |||
| ".scatter": "maybe could convert to P.ScatterNd", | |||
| "sigmoid": "maybe could convert to nn.Sigmoid", | |||
| ".sign": "maybe could convert to P.Sign", | |||
| ".sqrt": "maybe could convert to P.Sqrt", | |||
| ".sub": "maybe could convert to P.Sub", | |||
| ".transpose": "maybe could convert to P.Transpose", | |||
| ".unsqueeze": "maybe could convert to P.ExpandDims", | |||
| ".zero_": "maybe could convert to P.ZerosLike", | |||
| } | |||