PyTorch and MindSpore

View Source On Gitee

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.abs

mindspore.ops.Abs

torch.acos

mindspore.ops.ACos

torch.add

mindspore.ops.Add

torch.arange

mindspore.numpy.arange

torch.argmax

mindspore.ops.Argmax

torch.argmin

mindspore.ops.Argmin

torch.argsort

mindspore.ops.Sort

diff

torch.asin

mindspore.ops.Asin

torch.atan

mindspore.ops.Atan

torch.atan2

mindspore.ops.Atan2

torch.bartlett_window

mindspore.numpy.bartlett

torch.bincount

mindspore.numpy.bincount

torch.bitwise_and

mindspore.ops.BitwiseAnd

torch.bitwise_or

mindspore.ops.BitwiseOr

torch.bitwise_xor

mindspore.ops.BitwiseXor

torch.blackman_window

mindspore.numpy.blackman

torch.bmm

mindspore.ops.BatchMatMul

torch.broadcast_tensors

mindspore.ops.BroadcastTo

diff

torch.cat

mindspore.ops.Concat

diff

torch.ceil

mindspore.ops.Ceil

torch.chunk

mindspore.ops.Split

torch.clamp

mindspore.ops.clip_by_value

torch.conj

mindspore.ops.Conj

torch.cos

mindspore.ops.Cos

torch.cosh

mindspore.ops.Cosh

torch.cross

mindspore.numpy.cross

diff

torch.cumprod

mindspore.ops.CumProd

torch.cumsum

mindspore.ops.CumSum

torch.diag

mindspore.nn.MatrixDiag

diff

torch.diagflat

mindspore.numpy.diagflat

torch.diagonal

mindspore.numpy.diagonal

torch.div

mindspore.ops.Div

torch.dot

mindspore.ops.tensor_dot

diff

torch.empty

mindspore.numpy.empty

torch.empty_like

mindspore.numpy.empty_like

torch.eq

mindspore.ops.Equal

torch.erfc

mindspore.ops.Erfc

torch.erfinv

mindspore.ops.Erfinv

torch.exp

mindspore.ops.Exp

torch.expm1

mindspore.ops.Expm1

torch.eye

mindspore.ops.Eye

torch.flatten

mindspore.ops.Flatten

diff

torch.flip

mindspore.ops.ReverseV2

torch.floor

mindspore.ops.Floor

torch.floor_divide

mindspore.ops.FloorDiv

diff

torch.fmod

mindspore.ops.Mod

torch.from_numpy

mindspore.tensor.from_numpy

torch.full

mindspore.numpy.full

torch.full_like

mindspore.numpy.full_like

torch.gather

mindspore.ops.GatherD

torch.ge

mindspore.ops.GreaterEqual

torch.gt

mindspore.ops.Greater

torch.hamming_window

mindspore.numpy.hamming

torch.hann_window

mindspore.numpy.hanning

torch.histc

mindspore.ops.HistogramFixedWidth

torch.imag

mindspore.ops.Imag

torch.isfinite

mindspore.ops.IsFinite

torch.isinf

mindspore.ops.IsInf

torch.isnan

mindspore.ops.IsNan

torch.le

mindspore.ops.LessEqual

torch.lerp

mindspore.ops.Lerp

torch.linspace

mindspore.ops.LinSpace

torch.load

mindspore.load_checkpoint

torch.log

mindspore.ops.Log

torch.log1p

mindspore.ops.Log1p

torch.log2

mindspore.numpy.log2

torch.logical_and

mindspore.ops.LogicalAnd

diff

torch.logical_not

mindspore.numpy.logical_not

diff

torch.logical_or

mindspore.ops.LogicalOr

diff

torch.logical_xor

mindspore.numpy.logical_xor

diff

torch.logspace

mindspore.numpy.logspace

torch.lt

mindspore.ops.Less

torch.matmul

mindspore.nn.MatMul

torch.matrix_power

mindspore.numpy.matrix_power

torch.matrix_rank

mindspore.ops.Rank

torch.max

mindspore.ops.ArgMaxWithValue

diff

torch.maximum

mindspore.ops.Maximum

torch.mean

mindspore.ops.ReduceMean

torch.meshgrid

mindspore.ops.Meshgrid

torch.min

mindspore.ops.ArgMinWithValue

diff

torch.mm

mindspore.ops.MatMul

torch.mul

mindspore.ops.Mul

torch.multinomial

mindspore.ops.multinomial

torch.ne

mindspore.ops.NotEqual

torch.neg

mindspore.ops.Neg

torch.norm

mindspore.nn.Norm

diff

torch.numel

mindspore.ops.Size

torch.ones

mindspore.ops.Ones

torch.ones_like

mindspore.ops.OnesLike

torch.poisson

mindspore.ops.poisson

torch.pow

mindspore.ops.Pow

torch.prod

mindspore.ops.ReduceProd

torch.promote_types

mindspore.numpy.promote_types

torch.rand

mindspore.ops.UniformReal

torch.rand_like

mindspore.ops.UniformReal

torch.randint

mindspore.ops.UniformInt

torch.randint_like

mindspore.ops.UniformInt

torch.randn

mindspore.ops.StandardNormal

torch.randperm

mindspore.ops.Randperm

diff

torch.range

mindspore.nn.Range

torch.real

mindspore.ops.Real

torch.reciprocal

mindspore.ops.Reciprocal

torch.remainder

mindspore.numpy.remainder

torch.reshape

mindspore.ops.Reshape

torch.result_type

mindspore.numpy.result_type

torch.roll

mindspore.nn.Roll

torch.rot90

mindspore.numpy.rot90

torch.round

mindspore.ops.Rint

torch.rsqrt

mindspore.ops.Rsqrt

torch.save

mindspore.save_checkpoint

torch.sigmoid

mindspore.ops.Sigmoid

torch.sin

mindspore.ops.Sin

torch.sinh

mindspore.ops.Sinh

torch.sort

mindspore.ops.Sort

torch.sparse_coo_tensor

mindspore.SparseTensor

diff

torch.split

mindspore.ops.Split

torch.sqrt

mindspore.ops.Sqrt

torch.square

mindspore.ops.Square

torch.squeeze

mindspore.ops.Squeeze

torch.stack

mindspore.ops.Stack

torch.std

mindspore.Tensor.std

torch.std_mean

mindspore.ops.ReduceMean

diff

torch.sum

mindspore.ops.ReduceSum

torch.take

mindspore.Tensor.take

torch.tan

mindspore.ops.Tan

torch.tanh

mindspore.ops.Tanh

torch.tensor

mindspore.Tensor

torch.Tensor

mindspore.Tensor

torch.tensordot

mindspore.numpy.tensordot

torch.topk

mindspore.ops.TopK

diff

torch.trace

mindspore.Tensor.trace

torch.transpose

mindspore.ops.Transpose

torch.trapz

mindspore.numpy.trapz

torch.tril

mindspore.nn.Tril

torch.tril_indices

mindspore.numpy.tril_indices

torch.triu

mindspore.nn.Triu

torch.triu_indices

mindspore.numpy.triu_indices

torch.true_divide

mindspore.numpy.true_divide

torch.trunc

mindspore.numpy.trunc

torch.unbind

mindspore.ops.Unstack

torch.unique

mindspore.ops.Unique

diff

torch.unsqueeze

mindspore.ops.ExpandDims

torch.var

mindspore.Tensor.var

torch.where

mindspore.numpy.where

torch.zeros

mindspore.ops.Zeros

torch.zeros_like

mindspore.ops.ZerosLike

torch.autograd

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.autograd.backward

mindspore.ops.GradOperation

diff

torch.autograd.enable_grad

mindspore.ops.stop_gradient

diff

torch.autograd.grad

mindspore.ops.GradOperation

diff

torch.autograd.no_grad

mindspore.ops.stop_gradient

diff

torch.cuda

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.cuda.device_count

mindspore.communication.get_group_size

torch.cuda.set_device

mindspore.context.set_context

diff

torch.distributed

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.distributed.all_gather

mindspore.ops.AllGather

torch.distributed.all_reduce

mindspore.ops.AllReduce

torch.distributed.get_rank

mindspore.communication.get_rank

torch.distributed.init_process_group

mindspore.communication.init

diff

torch.distributed.new_group

mindspore.communication.create_group

diff

torch.distributions

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.distributions.gamma.Gamma

mindspore.ops.Gamma

torch.nn

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.nn.AdaptiveAvgPool2d

mindspore.ops.AdaptiveAvgPool2D

torch.nn.AvgPool1d

mindspore.nn.AvgPool1d

torch.nn.AvgPool2d

mindspore.nn.AvgPool2d

torch.nn.BatchNorm1d

mindspore.nn.BatchNorm1d

diff

torch.nn.BatchNorm2d

mindspore.nn.BatchNorm2d

diff

torch.nn.BCEWithLogitsLoss

mindspore.nn.BCEWithLogitsLoss

torch.nn.Conv1d

mindspore.nn.Conv1d

torch.nn.Conv2d

mindspore.nn.Conv2d

diff

torch.nn.Conv3d

mindspore.nn.Conv3d

torch.nn.ConvTranspose1d

mindspore.nn.Conv1dTranspose

torch.nn.ConvTranspose2d

mindspore.nn.Conv2dTranspose

torch.nn.ConvTranspose3d

mindspore.nn.Conv3dTranspose

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

diff

torch.nn.GELU

mindspore.nn.GELU

torch.nn.GELU

mindspore.nn.FastGelu

diff

torch.nn.GroupNorm

mindspore.nn.GroupNorm

torch.nn.GRU

mindspore.nn.GRU

torch.nn.Hardshrink

mindspore.nn.HShrink

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

diff

torch.nn.LSTM

mindspore.nn.LSTM

torch.nn.LSTMCell

mindspore.nn.LSTMCell

torch.nn.MaxPool1d

mindspore.nn.MaxPool1d

torch.nn.MaxPool2d

mindspore.nn.MaxPool2d

torch.nn.Module

mindspore.nn.Cell

torch.nn.Module.add_module

mindspore.nn.Cell.insert_child_to_cell

torch.nn.Module.buffers

mindspore.nn.Cell.untrainable_params

diff

torch.nn.Module.children

mindspore.nn.Cell.cells

diff

torch.nn.Module.load_state_dict

mindspore.load_param_into_net

torch.nn.Module.named_children

mindspore.nn.Cell.name_cells

diff

torch.nn.Module.named_modules

mindspore.nn.Cell.cells_and_names

torch.nn.Module.parameters

mindspore.nn.Cell.get_parameters

diff

torch.nn.Module.state_dict

mindspore.nn.Cell.parameters_dict

torch.nn.Module.train

mindspore.nn.Cell.set_train

torch.nn.ModuleList

mindspore.nn.CellList

torch.nn.MSELoss

mindspore.nn.MSELoss

torch.nn.Parameter

mindspore.Parameter

torch.nn.ParameterList

mindspore.ParameterTuple

diff

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.SELU

mindspore.ops.SeLU

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.Softshrink

mindspore.nn.SoftShrink

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.nn.ResizeBilinear

diff

torch.nn.functional

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.nn.functional.adaptive_avg_pool2d

mindspore.ops.AdaptiveAvgPool2D

torch.nn.functional.avg_pool1d

mindspore.nn.AvgPool1d

torch.nn.functional.avg_pool2d

mindspore.ops.AvgPool

torch.nn.functional.avg_pool3d

mindspore.ops.AvgPool3D

torch.nn.functional.batch_norm

mindspore.ops.BatchNorm

torch.nn.functional.binary_cross_entropy

mindspore.ops.BinaryCrossEntropy

torch.nn.functional.conv2d

mindspore.ops.Conv2D

torch.nn.functional.cosine_embedding_loss

mindspore.nn.CosineEmbeddingLoss

torch.nn.functional.ctc_loss

mindspore.ops.CTCLoss

torch.nn.functional.elu

mindspore.ops.Elu

torch.nn.functional.kl_div

mindspore.ops.KLDivLoss

torch.nn.functional.l1_loss

mindspore.nn.L1Loss

torch.nn.functional.layer_norm

mindspore.ops.LayerNorm

torch.nn.functional.leaky_relu

mindspore.nn.LeakyReLU

torch.nn.functional.log_softmax

mindspore.nn.LogSoftmax

torch.nn.functional.max_pool1d

mindspore.nn.MaxPool1d

torch.nn.functional.max_pool2d

mindspore.nn.MaxPool2d

torch.nn.functional.max_pool3d

mindspore.ops.MaxPool3D

diff

torch.nn.functional.mse_loss

mindspore.nn.MSELoss

torch.nn.functional.nll_loss

mindspore.ops.NLLLoss

diff

torch.nn.functional.normalize

mindspore.ops.L2Normalize

diff

torch.nn.functional.one_hot

mindspore.ops.OneHot

torch.nn.functional.pad

mindspore.nn.Pad

diff

torch.nn.functional.pixel_shuffle

mindspore.ops.DepthToSpace

torch.nn.functional.relu

mindspore.ops.ReLU

torch.nn.functional.smooth_l1_loss

mindspore.nn.SmoothL1Loss

torch.nn.functional.soft_margin_loss

mindspore.nn.SoftMarginLoss

torch.nn.functional.softmax

mindspore.ops.Softmax

diff

torch.nn.functional.softplus

mindspore.ops.Softplus

torch.nn.functional.softsign

mindspore.ops.Softsign

torch.nn.init

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.nn.init.constant_

mindspore.common.initializer.Constant

diff

torch.nn.init.kaiming_normal_

mindspore.common.initializer.HeNormal

torch.nn.init.kaiming_uniform_

mindspore.common.initializer.HeUniform

torch.nn.init.normal_

mindspore.common.initializer.Normal

diff

torch.nn.init.ones_

mindspore.common.initializer.One

torch.nn.init.xavier_uniform_

mindspore.common.initializer.XavierUniform

torch.nn.init.zeros_

mindspore.common.initializer.Zero

torch.nn.init.uniform_

mindspore.common.initializer.Uniform

diff

torch.optim

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.optim.Adadelta

mindspore.ops.ApplyAdadelta

diff

torch.optim.Adagrad

mindspore.nn.Adagrad

diff

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.ExponentialLR

mindspore.nn.exponential_decay_lr

diff

torch.optim.lr_scheduler.MultiStepLR

mindspore.nn.piecewise_constant_lr

diff

torch.optim.lr_scheduler.StepLR

mindspore.nn.piecewise_constant_lr

torch.optim.Optimizer

mindspore.nn.Optimizer

diff

torch.optim.Optimizer.step

mindspore.nn.TrainOneStepCell

diff

torch.optim.RMSprop

mindspore.nn.RMSProp

torch.optim.SGD

mindspore.nn.SGD

torch.Tensor

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.repeat_interleave

mindspore.ops.repeat_elements

torch.BoolTensor.all

mindspore.Tensor.all

torch.BoolTensor.any

mindspore.Tensor.any

torch.minimum

mindspore.ops.Minimum

torch.Tensor.abs

mindspore.Tensor.abs

torch.Tensor.argmax

mindspore.Tensor.argmax

torch.Tensor.argmin

mindspore.Tensor.argmin

torch.Tensor.chunk

mindspore.ops.Split

torch.Tensor.copy_

mindspore.Tensor.copy

torch.Tensor.cumsum

mindspore.Tensor.cumsum

torch.Tensor.diagonal

mindspore.Tensor.diagonal

torch.Tensor.dtype

mindspore.Tensor.dtype

torch.Tensor.expand

mindspore.ops.BroadcastTo

torch.Tensor.expand_as

mindspore.Tensor.expand_as

torch.Tensor.fill_

mindspore.ops.Fill

torch.Tensor.flatten

mindspore.Tensor.flatten

torch.Tensor.float

mindspore.ops.Cast

diff

torch.Tensor.index_add

mindspore.ops.InplaceAdd

torch.Tensor.max

mindspore.Tensor.max

torch.Tensor.mean

mindspore.Tensor.mean

torch.Tensor.min

mindspore.Tensor.min

torch.Tensor.mm

mindspore.ops.MatMul

torch.Tensor.mul

mindspore.ops.Mul

torch.Tensor.ndim

mindspore.Tensor.ndim

torch.Tensor.new_full

mindspore.numpy.full

torch.Tensor.new_zeros

mindspore.ops.Zeros

torch.Tensor.numpy

mindspore.Tensor.asnumpy

torch.Tensor.pow

mindspore.ops.Pow

torch.Tensor.repeat

mindspore.numpy.tile

diff

torch.Tensor.requires_grad_

mindspore.Parameter.requires_grad

torch.Tensor.reshape_as

mindspore.tensor.reshape

torch.Tensor.resize_

mindspore.Tensor.resize

torch.Tensor.round

mindspore.ops.Round

torch.Tensor.scatter

mindspore.ops.ScatterNd

torch.Tensor.scatter_add_

mindspore.ops.ScatterNdAdd

diff

torch.Tensor.sigmoid

mindspore.nn.Sigmoid

torch.Tensor.sign

mindspore.ops.Sign

torch.Tensor.size

mindspore.Tensor.shape

torch.Tensor.sqrt

mindspore.ops.Sqrt

torch.Tensor.stride

mindspore.Tensor.strides

diff

torch.Tensor.squeeze

mindspore.Tensor.squeeze

torch.Tensor.sub

mindspore.ops.Sub

torch.Tensor.sum

mindspore.Tensor.sum

torch.Tensor.t

mindspore.ops.Transpose

diff

torch.Tensor.t

mindspore.Tensor.T

torch.Tensor.take

mindspore.Tensor.take

torch.Tensor.transpose

mindspore.Tensor.transpose

torch.Tensor.unsqueeze

mindspore.ops.ExpandDims

torch.Tensor.view

mindspore.Tensor.view

torch.Tensor.view_as

mindspore.Tensor.view

torch.Tensor.zero_

mindspore.ops.ZerosLike

torch.utils

PyTorch 1.5.0 APIs

MindSpore APIs

Description

torch.utils.data.DataLoader

None

diff

torch.utils.data.Dataset

mindspore.dataset.GeneratorDataset

diff

torch.utils.data.distributed.DistributedSampler

mindspore.dataset.DistributedSampler

torch.utils.data.RandomSampler

mindspore.dataset.RandomSampler

torch.utils.data.SequentialSampler

mindspore.dataset.SequentialSampler

torch.utils.data.SubsetRandomSampler

mindspore.dataset.SubsetRandomSampler

torch.utils.data.WeightedRandomSampler

mindspore.dataset.WeightedRandomSampler

torchtext

TorchText 0.10.0 APIs

MindSpore APIs

Description

torchtext.data.functional.custom_replace

mindspore.dataset.text.transforms.RegexReplace

torchtext.data.functional.load_sp_model

mindspore.dataset.text.transforms.SentencePieceVocab

diff

torchtext.data.functional.numericalize_tokens_from_iterator

mindspore.dataset.text.transforms.Lookup

diff

torchtext.data.functional.sentencepiece_numericalizer

mindspore.dataset.text.transforms.SentencePieceTokenizer

diff

torchtext.data.functional.sentencepiece_tokenizer

mindspore.dataset.text.transforms.SentencePieceTokenizer

diff

torchtext.data.functional.simple_space_split

mindspore.dataset.text.transforms.WhitespaceTokenizer

torchtext.data.utils.ngrams_iterator

mindspore.dataset.text.transforms.Ngram

diff

torchvision

TorchVision 0.10.0 APIs

MindSpore APIs

Description

torchvision.datasets.CelebA

mindspore.dataset.CelebADataset

torchvision.datasets.CIFAR10

mindspore.dataset.Cifar10Dataset

torchvision.datasets.CIFAR100

mindspore.dataset.Cifar100Dataset

torchvision.datasets.CocoDetection

mindspore.dataset.CocoDataset

diff

torchvision.datasets.ImageFolder

mindspore.dataset.ImageFolderDataset

torchvision.datasets.MNIST

mindspore.dataset.MnistDataset

torchvision.datasets.VOCDetection

mindspore.dataset.VOCDataset

diff

torchvision.datasets.VOCSegmentation

mindspore.dataset.VOCDataset

diff

torchvision.ops.nms

mindspore.ops.NMSWithMask

torchvision.ops.roi_align

mindspore.ops.ROIAlign

torchvision.transforms.CenterCrop

mindspore.dataset.vision.c_transforms.CenterCrop

torchvision.transforms.ColorJitter

mindspore.dataset.vision.c_transforms.RandomColorAdjust

torchvision.transforms.Compose

mindspore.dataset.transforms.c_transforms.Compose

torchvision.transforms.ConvertImageDtype

mindspore.dataset.vision.py_transforms.ToType

diff

torchvision.transforms.FiveCrop

mindspore.dataset.vision.py_transforms.FiveCrop

torchvision.transforms.GaussianBlur

mindspore.dataset.vision.c_transforms.GaussianBlur

torchvision.transforms.Grayscale

mindspore.dataset.vision.py_transforms.Grayscale

torchvision.transforms.LinearTransformation

mindspore.dataset.vision.py_transforms.LinearTransformation

torchvision.transforms.Normalize

mindspore.dataset.vision.c_transforms.Normalize

torchvision.transforms.Pad

mindspore.dataset.vision.c_transforms.Pad

torchvision.transforms.RandomAffine

mindspore.dataset.vision.c_transforms.RandomAffine

torchvision.transforms.RandomApply

mindspore.dataset.transforms.c_transforms.RandomApply

torchvision.transforms.RandomChoice

mindspore.dataset.transforms.c_transforms.RandomChoice

torchvision.transforms.RandomCrop

mindspore.dataset.vision.c_transforms.RandomCrop

torchvision.transforms.RandomErasing

mindspore.dataset.vision.py_transforms.RandomErasing

torchvision.transforms.RandomGrayscale

mindspore.dataset.vision.py_transforms.RandomGrayscale

torchvision.transforms.RandomHorizontalFlip

mindspore.dataset.vision.c_transforms.RandomHorizontalFlip

torchvision.transforms.RandomOrder

mindspore.dataset.transforms.py_transforms.RandomOrder

torchvision.transforms.RandomPerspective

mindspore.dataset.vision.py_transforms.RandomPerspective

torchvision.transforms.RandomPosterize

mindspore.dataset.vision.c_transforms.RandomPosterize

torchvision.transforms.RandomResizedCrop

mindspore.dataset.vision.c_transforms.RandomResizedCrop

torchvision.transforms.RandomRotation

mindspore.dataset.vision.c_transforms.RandomRotation

torchvision.transforms.RandomSolarize

mindspore.dataset.vision.c_transforms.RandomSolarize

diff

torchvision.transforms.RandomVerticalFlip

mindspore.dataset.vision.c_transforms.RandomVerticalFlip

torchvision.transforms.Resize

mindspore.dataset.vision.c_transforms.Resize

torchvision.transforms.TenCrop

mindspore.dataset.vision.py_transforms.TenCrop

torchvision.transforms.ToPILImage

mindspore.dataset.vision.py_transforms.ToPIL

diff

torchvision.transforms.ToTensor

mindspore.dataset.vision.py_transforms.ToTensor

diff