提交 d9ad52ad 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!286 Add some API mapping of vm ops

Merge pull request !286 from liuwenhao/master
......@@ -9,12 +9,18 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torch.add | mindspore.ops.operations.TensorAdd |
| torch.argmax | mindspore.ops.operations.Argmax |
| torch.argmin | mindspore.ops.operations.Argmin |
| torch.asin | mindspore.ops.operations.Asin |
| torch.atan | mindspore.ops.operations.Atan |
| torch.atan2 | mindspore.ops.operations.Atan2 |
| torch.bitwise_and | mindspore.ops.operations.BitwiseAnd |
| torch.bitwise_or | mindspore.ops.operations.BitwiseOr |
| torch.bmm | mindspore.ops.operations.BatchMatMul |
| torch.cat | mindspore.ops.operations.Concat |
| torch.ceil | mindspore.ops.operations.Ceil |
| torch.chunk | mindspore.ops.operations.Split |
| torch.clamp | mindspore.ops.composite.clip_by_value |
| torch.cos | mindspore.ops.operations.Cos |
| torch.cosh | mindspore.ops.operations.Cosh |
| torch.cuda.device_count | mindspore.communication.get_group_size |
| torch.cuda.set_device | mindspore.context.set_context |
| torch.cumprod | mindspore.ops.operations.CumProd |
......@@ -27,9 +33,11 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torch.eq | mindspore.ops.operations.Equal |
| torch.erfc | mindspore.ops.operations.Erfc |
| torch.exp | mindspore.ops.operations.Exp |
| torch.expm1 | mindspore.ops.operations.Expm1 |
| torch.eye | mindspore.ops.operations.Eye |
| torch.flatten | mindspore.ops.operations.Flatten |
| torch.floor | mindspore.ops.operations.Floor |
| torch.linspace | mindspore.nn.LinSpace |
| torch.load | mindspore.train.serialization.load_checkpoint |
| torch.log | mindspore.ops.operations.Log |
| torch.log1p | mindspore.ops.operations.Log1p |
......@@ -96,7 +104,10 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torch.numel | mindspore.ops.operations.Size |
| torch.ones | mindspore.ops.operations.OnesLike |
| torch.ones_like | mindspore.ops.operations.OnesLike |
| torch.optim.Adadelta | mindspore.ops.operations.ApplyAdadelta |
| torch.optim.Adagrad | mindspore.ops.operations.ApplyAdagrad |
| torch.optim.Adam | mindspore.nn.Adam |
| torch.optim.Adamax | mindspore.ops.operations.ApplyAdaMax |
| torch.optim.AdamW | mindspore.nn.AdamWeightDecay |
| torch.optim.lr_scheduler.CosineAnnealingWarmRestarts | mindspore.nn.dynamic_lr.cosine_decay_lr |
| torch.optim.lr_scheduler.StepLR | mindspore.nn.dynamic_lr.piecewise_constant_lr |
......@@ -106,10 +117,12 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torch.pow | mindspore.ops.operations.Pow |
| torch.prod | mindspore.ops.operations.ReduceProd |
| torch.randn | mindspore.ops.operations.TruncatedNormal |
| torch.range | mindspore.nn.Range |
| torch.round | mindspore.ops.operations.Round |
| torch.save | mindspore.train.serialization.save_checkpoint |
| torch.sigmoid | mindspore.ops.operations.Sigmoid |
| torch.sin | mindspore.ops.operations.Sin |
| torch.sinh | mindspore.ops.operations.Sinh |
| torch.sparse.FloatTensor | mindspore.Tensor |
| torch.split | mindspore.ops.operations.Split |
| torch.sqrt | mindspore.ops.operations.Sqrt |
......@@ -121,8 +134,10 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torch.tensor | mindspore.Tensor |
| torch.Tensor | mindspore.Tensor |
| torch.Tensor.chunk | mindspore.ops.operations.Split |
| torch.Tensor.expand | mindspore.ops.operations.BroadcastTo |
| torch.Tensor.fill_ | mindspore.ops.operations.Fill |
| torch.Tensor.float | mindspore.ops.operations.Cast |
| torch.Tensor.index_add | mindspore.ops.operations.InplaceAdd |
| torch.Tensor.mm | mindspore.ops.operations.MatMul |
| torch.Tensor.mul | mindspore.ops.operations.Mul |
| torch.Tensor.pow | mindspore.ops.operations.Pow |
......@@ -157,4 +172,4 @@ Mapping between PyTorch APIs and MindSpore APIs, which is provided by the commun
| torchvision.transforms.Normalize | mindspore.dataset.transforms.vision.py_transforms.Normalize |
| torchvision.transforms.RandomHorizontalFlip | mindspore.dataset.transforms.vision.py_transforms.RandomHorizontalFlip |
| torchvision.transforms.Resize | mindspore.dataset.transforms.vision.py_transforms.Resize |
| torchvision.transforms.ToTensor | mindspore.dataset.transforms.vision.py_transforms.ToTensor |
\ No newline at end of file
| torchvision.transforms.ToTensor | mindspore.dataset.transforms.vision.py_transforms.ToTensor |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册