diff --git a/resource/api_mapping.md b/resource/api_mapping.md index bb3471b378ec24b365eb784563d60598c72dc3d0..4743f88c02b7b56530ad9ba7ecfc48eb0f5f5db3 100644 --- a/resource/api_mapping.md +++ b/resource/api_mapping.md @@ -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 |