PyTorch and MindSpore API Mapping Table
Mapping between TensorFlow APIs and MindSpore APIs, which is provided by the community. There may be differences in parameters, inputs, outputs, logic functions, and specific scenarios. For details, see the description of each API or the difference comparison provided.
More MindSpore developers are also welcome to participate in improving the mapping content.
torch
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.autograd
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.cuda
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.distributed
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.distributions
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.nn
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.nn.functional
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.nn.init
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.optim
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torch.Tensor
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
Set reduction to “add” in mindspore.ops.tensor_scatter_elements. |
||
torch.utils
PyTorch 1.5.0 APIs |
MindSpore APIs |
Description |
---|---|---|
None |
||
torchtext
TorchText 0.10.0 APIs |
MindSpore APIs |
Description |
---|---|---|
torchvision
TorchVision 0.10.0 APIs |
MindSpore APIs |
Description |
---|---|---|