345 Star 1.6K Fork 1K

MindSpore/docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.gitee
.github
docs
install
lite
resource
_static
release
statement
MindSpore-logo.png
api_mapping.md
jieba.txt
tools
tutorials
.gitignore
CONTRIBUTING_DOC.md
CONTRIBUTING_DOC_CN.md
LICENSE
LICENSE-CC-BY-4.0
NOTICE
README.md
README_CN.md
克隆/下载
api_mapping.md 25.10 KB
一键复制 编辑 原始数据 按行查看 历史

API Mapping

Mapping between PyTorch APIs and MindSpore APIs, which is provided by the community.

PyTorch APIs MindSpore APIs
torch.abs mindspore.ops.Abs
torch.acos mindspore.ops.ACos
torch.add mindspore.ops.Add
torch.argmax mindspore.ops.Argmax
torch.argmin mindspore.ops.Argmin
torch.asin mindspore.ops.Asin
torch.atan mindspore.ops.Atan
torch.atan2 mindspore.ops.Atan2
torch.bitwise_and mindspore.ops.BitwiseAnd
torch.bitwise_or mindspore.ops.BitwiseOr
torch.bmm mindspore.ops.BatchMatMul
torch.broadcast_tensors mindspore.ops.BroadcastTo
torch.cat mindspore.ops.Concat
torch.ceil mindspore.ops.Ceil
torch.chunk mindspore.ops.Split
torch.clamp mindspore.ops.clip_by_value
torch.cos mindspore.ops.Cos
torch.cosh mindspore.ops.Cosh
torch.cuda.device_count mindspore.communication.get_group_size
torch.cuda.set_device mindspore.context.set_context
torch.cumprod mindspore.ops.CumProd
torch.cumsum mindspore.ops.CumSum
torch.det mindspore.nn.MatDet
torch.diag mindspore.ops.Diag
torch.digamma mindspore.nn.DiGamma
torch.distributed.all_gather mindspore.ops.AllGather
torch.distributed.all_reduce mindspore.ops.AllReduce
torch.distributions.gamma.Gamma mindspore.ops.Gamma
torch.distributed.get_rank mindspore.communication.get_rank
torch.distributed.init_process_group mindspore.communication.init
torch.div mindspore.ops.Div
torch.dot mindspore.ops.tensor_dot
torch.eq mindspore.ops.Equal
torch.erfc mindspore.ops.Erfc
torch.exp mindspore.ops.Exp
torch.expm1 mindspore.ops.Expm1
torch.eye mindspore.ops.Eye
torch.flatten mindspore.ops.Flatten
torch.flip mindspore.ops.ReverseV2
torch.floor mindspore.ops.Floor
torch.floor_divide mindspore.ops.FloorDiv
torch.fmod mindspore.ops.Mod
torch.gather mindspore.ops.GatherD
torch.histc mindspore.ops.HistogramFixedWidth
torch.inverse mindspore.nn.MatInverse
torch.lgamma mindspore.nn.LGamma
torch.linspace mindspore.ops.LinSpace
torch.load mindspore.load_checkpoint
torch.log mindspore.ops.Log
torch.log1p mindspore.ops.Log1p
torch.logsumexp mindspore.nn.ReduceLogSumExp
torch.matmul mindspore.nn.MatMul
torch.max mindspore.ops.Maximum
torch.mean mindspore.ops.ReduceMean
torch.min mindspore.ops.Minimum
torch.mm mindspore.ops.MatMul
torch.mul mindspore.ops.Mul
torch.nn.AdaptiveAvgPool2d mindspore.ops.ReduceMean
torch.nn.AvgPool1d mindspore.nn.AvgPool1d
torch.nn.AvgPool2d mindspore.nn.AvgPool2d
torch.nn.BatchNorm1d mindspore.nn.BatchNorm1d
torch.nn.BatchNorm2d mindspore.nn.BatchNorm2d
torch.nn.Conv2d mindspore.nn.Conv2d
torch.nn.ConvTranspose2d mindspore.nn.Conv2dTranspose
torch.nn.CrossEntropyLoss mindspore.nn.SoftmaxCrossEntropyWithLogits
torch.nn.CTCLoss mindspore.ops.CTCLoss
torch.nn.Dropout mindspore.nn.Dropout
torch.nn.Embedding mindspore.nn.Embedding
torch.nn.Flatten mindspore.nn.Flatten
torch.nn.functional.adaptive_avg_pool2d mindspore.nn.AvgPool2d
torch.nn.functional.avg_pool2d mindspore.ops.AvgPool
torch.nn.functional.binary_cross_entropy mindspore.ops.BinaryCrossEntropy
torch.nn.functional.conv2d mindspore.ops.Conv2D
torch.nn.functional.elu mindspore.ops.Elu
torch.nn.functional.log_softmax mindspore.nn.LogSoftmax
torch.nn.functional.normalize mindspore.ops.L2Normalize
torch.nn.functional.one_hot mindspore.ops.OneHot
torch.nn.functional.pad mindspore.ops.Pad
torch.nn.functional.pixel_shuffle mindspore.ops.DepthToSpace
torch.nn.functional.relu mindspore.ops.ReLU
torch.nn.functional.softmax mindspore.ops.Softmax
torch.nn.functional.softplus mindspore.ops.Softplus
torch.nn.functional.softsign mindspore.ops.Softsign
torch.nn.GELU mindspore.nn.GELU
torch.nn.GELU mindspore.nn.FastGelu
torch.nn.GroupNorm mindspore.nn.GroupNorm
torch.nn.init.constant_ mindspore.common.initializer.Constant
torch.nn.init.uniform_ mindspore.common.initializer.Uniform
torch.nn.KLDivLoss mindspore.ops.KLDivLoss
torch.nn.L1Loss mindspore.nn.L1Loss
torch.nn.LayerNorm mindspore.nn.LayerNorm
torch.nn.LeakyReLU mindspore.nn.LeakyReLU
torch.nn.Linear mindspore.nn.Dense
torch.nn.LSTM mindspore.nn.LSTM
torch.nn.LSTMCell mindspore.nn.LSTMCell
torch.nn.MaxPool2d mindspore.nn.MaxPool2d
torch.nn.Module mindspore.nn.Cell
torch.nn.Module.load_state_dict mindspore.load_param_into_net
torch.nn.ModuleList mindspore.nn.CellList
torch.nn.MSELoss mindspore.nn.MSELoss
torch.nn.Parameter mindspore.Parameter
torch.nn.ParameterList mindspore.ParameterTuple
torch.nn.PixelShuffle mindspore.ops.DepthToSpace
torch.nn.PReLU mindspore.nn.PReLU
torch.nn.ReLU mindspore.nn.ReLU
torch.nn.ReplicationPad2d mindspore.nn.Pad
torch.nn.Sequential mindspore.nn.SequentialCell
torch.nn.Sigmoid mindspore.nn.Sigmoid
torch.nn.SmoothL1Loss mindspore.nn.SmoothL1Loss
torch.nn.Softmax mindspore.nn.Softmax
torch.nn.SyncBatchNorm.convert_sync_batchnorm mindspore.nn.GlobalBatchNorm
torch.nn.Tanh mindspore.nn.Tanh
torch.nn.Unfold mindspore.nn.Unfold
torch.nn.Upsample mindspore.ops.ResizeBilinear
torch.norm mindspore.nn.Norm
torch.numel mindspore.ops.Size
torch.ones mindspore.ops.Ones
torch.ones_like mindspore.ops.OnesLike
torch.optim.Adadelta mindspore.ops.ApplyAdadelta
torch.optim.Adagrad mindspore.ops.ApplyAdagrad
torch.optim.Adam mindspore.nn.Adam
torch.optim.Adamax mindspore.ops.ApplyAdaMax
torch.optim.AdamW mindspore.nn.AdamWeightDecay
torch.optim.lr_scheduler.CosineAnnealingWarmRestarts mindspore.nn.cosine_decay_lr
torch.optim.lr_scheduler.StepLR mindspore.nn.piecewise_constant_lr
torch.optim.Optimizer.step mindspore.nn.TrainOneStepCell
torch.optim.RMSprop mindspore.nn.RMSProp
torch.optim.SGD mindspore.nn.SGD
torch.pow mindspore.ops.Pow
torch.prod mindspore.ops.ReduceProd
torch.rand mindspore.ops.UniformReal
torch.randint mindspore.ops.UniformInt
torch.randn mindspore.ops.StandardNormal
torch.range mindspore.nn.Range
torch.round mindspore.ops.Rint
torch.save mindspore.save_checkpoint
torch.sigmoid mindspore.ops.Sigmoid
torch.sin mindspore.ops.Sin
torch.sinh mindspore.ops.Sinh
torch.sparse.FloatTensor mindspore.Tensor
torch.split mindspore.ops.Split
torch.sqrt mindspore.ops.Sqrt
torch.squeeze mindspore.ops.Squeeze
torch.stack mindspore.ops.Pack
torch.std_mean mindspore.ops.ReduceMean
torch.sum mindspore.ops.ReduceSum
torch.tan mindspore.ops.Tan
torch.tanh mindspore.ops.Tanh
torch.tensor mindspore.Tensor
torch.Tensor mindspore.Tensor
torch.Tensor.chunk mindspore.ops.Split
torch.Tensor.expand mindspore.ops.BroadcastTo
torch.Tensor.fill_ mindspore.ops.Fill
torch.Tensor.float mindspore.ops.Cast
torch.Tensor.index_add mindspore.ops.InplaceAdd
torch.Tensor.mm mindspore.ops.MatMul
torch.Tensor.mul mindspore.ops.Mul
torch.Tensor.pow mindspore.ops.Pow
torch.Tensor.repeat mindspore.ops.Tile
torch.repeat_interleave mindspore.ops.repeat_elements
torch.Tensor.requires_grad_ mindspore.Parameter.requires_grad
torch.Tensor.round mindspore.ops.Round
torch.Tensor.scatter mindspore.ops.ScatterNd
torch.Tensor.scatter_add_ mindspore.ops.ScatterNdAdd
torch.Tensor.sigmoid mindspore.nn.Sigmoid
torch.Tensor.sign mindspore.ops.Sign
torch.Tensor.size mindspore.ops.Shape
torch.Tensor.sqrt mindspore.ops.Sqrt
torch.Tensor.sub mindspore.ops.Sub
torch.Tensor.t mindspore.ops.Transpose
torch.Tensor.transpose mindspore.ops.Transpose
torch.Tensor.unsqueeze mindspore.ops.ExpandDims
torch.Tensor.view mindspore.ops.Reshape
torch.Tensor.zero_ mindspore.ops.ZerosLike
torch.transpose mindspore.ops.Transpose
torch.tril mindspore.nn.Tril
torch.triu mindspore.nn.Triu
torch.unbind mindspore.ops.Unpack
torch.unique mindspore.ops.Unique
torch.unsqueeze mindspore.ops.ExpandDims
torch.utils.data.DataLoader mindspore.DatasetHelper
torch.utils.data.Dataset mindspore.dataset.MindDataset
torch.utils.data.distributed.DistributedSampler mindspore.dataset.DistributedSampler
torch.zeros mindspore.ops.Zeros
torch.zeros_like mindspore.ops.ZerosLike
torchvision.datasets.ImageFolder mindspore.dataset.ImageFolderDataset
torchvision.ops.nms mindspore.ops.NMSWithMask
torchvision.ops.roi_align mindspore.ops.ROIAlign
torchvision.transforms.CenterCrop mindspore.dataset.vision.py_transforms.CenterCrop
torchvision.transforms.ColorJitter mindspore.dataset.vision.py_transforms.RandomColorAdjust
torchvision.transforms.Compose mindspore.dataset.transforms.py_transforms.Compose
torchvision.transforms.Normalize mindspore.dataset.vision.py_transforms.Normalize
torchvision.transforms.RandomHorizontalFlip mindspore.dataset.vision.py_transforms.RandomHorizontalFlip
torchvision.transforms.Resize mindspore.dataset.vision.py_transforms.Resize
torchvision.transforms.ToTensor mindspore.dataset.vision.py_transforms.ToTensor
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r1.1

搜索帮助