PyTorch API名称

对应Paddle API

torch.set_default_dtypepaddle.set_default_dtype
torch.get_default_dtypepaddle.get_default_dtype
torch.numelpaddle.numel
torch.set_printoptionspaddle.set_printoptions
torch.tensorpaddle.to_tensor
torch.from_numpypaddle.to_tensor
torch.zerospaddle.zeros
torch.zeros_likepaddle.zeros_like
torch.onespaddle.ones
torch.ones_likepaddle.ones_like
torch.arangepaddle.arange
torch.rangepaddle.arange
torch.linspacepaddle.linspace
torch.eyepaddle.eye
torch.emptypaddle.empty
torch.empty_likepaddle.empty_like
torch.fullpaddle.full
torch.full_likepaddle.full_like
torch.catpaddle.concat(x, axis=0, name=None)
torch.chunkpaddle.chunk
torch.gatherpaddle.gather
torch.index_selectpaddle.index_select
torch.masked_selectpaddle.masked_select
torch.narrowpaddle.slice
torch.nonzeropaddle.nonzero
torch.reshapepaddle.reshape
torch.splitpaddle.split
torch.squeezepaddle.squeeze
torch.stackpaddle.stack
torch.tpaddle.t
torch.transposepaddle.transpose
torch.unbindpaddle.unbind
torch.unsqueezepaddle.nn.functional.unsqueeze
torch.wherepaddle.where
torch.seedpaddle.seed
torch.manual_seedpaddle.seed
torch.get_rng_statepaddle.get_cuda_rng_state
torch.set_rng_statepaddle.set_cuda_rng_stata
torch.bernoullipaddle.bernoulli
torch.multinomialpaddle.multinomial
torch.normalpaddle.normal
torch.randpaddle.rand
torch.randintpaddle.randint
torch.randnpaddle.randn
torch.randpermpaddle.randperm
torch.savepaddle.save
torch.loadpaddle.load
torch.no_gradpaddle.no_grad
torch.abspaddle.abs
torch.absolutepaddle.abs
torch.acospaddle.acos
torch.arccospaddle.acos
torch.addpaddle.add
torch.asinpaddle.asin
torch.arcsinpaddle.asin
torch.atanpaddle.atan
torch.arctanpaddle.atan
torch.ceilpaddle.ceil
torch.clippaddle.clip
torch.conjpaddle.conj
torch.cospaddle.cos
torch.coshpaddle.cosh
torch.divpaddle.divide
torch.dividepaddle.divide
torch.erfpaddle.erf
torch.exppaddle.exp
torch.floorpaddle.floor
torch.floor_dividepaddle.floor_divide
torch.fmodpaddle.mod
torch.imagpaddle.imag
torch.logpaddle.log
torch.log10paddle.log10
torch.log1ppaddle.log1p
torch.log2paddle.log2
torch.logical_andpaddle.logical_and
torch.logical_notpaddle.logical_not
torch.logical_orpaddle.logical_or
torch.logical_xorpaddle.logical_xor
torch.mulpaddle.multiply
torch.multiplypaddle.multiply
torch.powpaddle.pow
torch.realpaddle.real
torch.reciprocalpaddle.reciprocal
torch.remainderpaddle.mod
torch.roundpaddle.round
torch.rsqrtpaddle.rsqrt
torch.sigmoidpaddle.nn.functional.sigmoid
torch.signpaddle.sign
torch.sinpaddle.sin
torch.sinhpaddle.sinh
torch.sqrtpaddle.sqrt
torch.squarepaddle.square
torch.subpaddle.subtract
torch.subtractpaddle.subtract
torch.tanhpaddle.tanh
torch.true_dividepaddle.divide
torch.argmaxpaddle.argmax
torch.argminpaddle.argmin
torch.maxpaddle.max
torch.minpaddle.min
torch.distpaddle.dist
torch.logsumexppaddle.logsumexp
torch.meanpaddle.mean
torch.medianpaddle.median
torch.normpaddle.norm
torch.prodpaddle.prod
torch.stdpaddle.std
torch.sumpaddle.sum
torch.uniquepaddle.unique
torch.varpaddle.var
torch.allclosepaddle.allclose
torch.argsortpaddle.argsort
torch.eqpaddle.equal
torch.equalpaddle.equal
torch.gepaddle.greater_equal
torch.greater_equalpaddle.greater_equal
torch.gtpaddle.greater_than
torch.greaterpaddle.greater_than
torch.isfinitepaddle.isfinite
torch.isinfpaddle.isinf
torch.isnanpaddle.isnan
torch.lepaddle.less_equal
torch.less_equalpaddle.less_equal
torch.ltpaddle.less_than
torch.lesspaddle.less_than
torch.maximumpaddle.maximum
torch.minimumpaddle.minimum
torch.nepaddle.not_equal
torch.not_equalpaddle.not_equal
torch.sortpaddle.sort
torch.topkpaddle.topk
torch.crosspaddle.cross
torch.cumsumpaddle.cumsum
torch.diagpaddle.diag
torch.diag_embedpaddle.nn.functional.diag_embed
torch.flattenpaddle.flatten
torch.flippaddle.flip
torch.meshgridpaddle.meshgrid
torch.rollpaddle.roll
torch.tracepaddle.trace
torch.trilpaddle.tril
torch.triupaddle.triu
torch.addmmpaddle.addmm
torch.bmmpaddle.bmm
torch.choleskypaddle.cholesky
torch.dotpaddle.dot
torch.inversepaddle.inverse
torch.matmulpaddle.matmul
torch.mmpaddle.matmul
torch.mvpaddle.mv
torch.nn.Sequentialpaddle.nn.Sequential
torch.nn.ModuleListpaddle.nn.LayerList
torch.nn.ParameterListpaddle.nn.ParamterList
torch.nn.Conv1dpaddle.nn.Conv1D
torch.nn.Conv2dpaddle.nn.Conv2D
torch.nn.Conv3dpaddle.nn.Conv3D
torch.nn.ConvTranspose1dpaddle.nn.Conv1DTranspose
torch.nn.ConvTranspose2dpaddle.nn.Conv2DTranspose
torch.nn.ConvTranspose3dpaddle.nn.Conv3DTranspose
torch.nn.MaxPool1dpaddle.nn.MaxPool1D
torch.nn.MaxPool2dpaddle.nn.MaxPool2D
torch.nn.MaxPool3dpaddle.nn.MaxPool3D
torch.nn.AvgPool1dpaddle.nn.AvgPool1D
torch.nn.AvgPool2dpaddle.nn.AvgPool2D
torch.nn.AvgPool3dpaddle.nn.AvgPool3D
torch.nn.AdaptiveMaxPool1dpaddle.nn.AdaptiveMaxPool1D
torch.nn.AdaptiveMaxPool2dpaddle.nn.AdaptiveMaxPool2D
torch.nn.AdaptiveMaxPool3dpaddle.nn.AdaptiveMaxPool3D
torch.nn.AdaptiveAvgPool1dpaddle.nn.AdaptiveAvgPool1D
torch.nn.AdaptiveAvgPool2dpaddle.nn.AdaptiveAvgPool2D
torch.nn.AdaptiveAvgPool3dpaddle.nn.AdaptiveAvgPool3D
torch.nn.ELUpaddle.nn.ELU
torch.nn.Hardshrinkpaddle.nn.Hardshrink
torch.nn.Hardsigmoidpaddle.nn.Hardsigmoid
torch.nn.Hardtanhpaddle.nn.Hardtanh
torch.nn.Hardswishpaddle.nn.Hardswish
torch.nn.LeakyReLUpaddle.nn.LeakyReLU
torch.nn.LogSigmoidpaddle.nn.LogSigmoid
torch.nn.MultiheadAttentionpaddle.nn.MultiHeadAttention
torch.nn.PReLUpaddle.nn.PReLU
torch.nn.ReLUpaddle.nn.ReLU
torch.nn.ReLU6paddle.nn.ReLU6
torch.nn.SELUpaddle.nn.SELU
torch.nn.GELUpaddle.nn.GELU
torch.nn.Sigmoidpaddle.nn.Sigmoid
torch.nn.Softpluspaddle.nn.Softplus
torch.nn.Softshrinkpaddle.nn.Softshrink
torch.nn.Softsignpaddle.nn.Softsign
torch.nn.Tanhpaddle.nn.Tanh
torch.nn.Tanhshrinkpaddle.nn.Tanhshrink
torch.nn.Thresholdpaddle.nn.ThresholdedReLU
torch.nn.Softmaxpaddle.nn.Softmax
torch.nn.LogSoftmaxpaddle.nn.LogSoftmax
torch.nn.BatchNorm1dpaddle.nn.BatchNorm1D
torch.nn.BatchNorm2dpaddle.nn.BatchNorm2D
torch.nn.BatchNorm3dpaddle.nn.BatchNorm3D
torch.nn.GroupNormpaddle.nn.GroupNorm
torch.nn.SyncBatchNormpaddle.nn.SyncBatchNorm
torch.nn.InstanceNorm1dpaddle.nn.InstanceNorm1D
torch.nn.InstanceNorm2dpaddle.nn.InstanceNorm2D
torch.nn.InstanceNorm3dpaddle.nn.InstanceNorm3D
torch.nn.LayerNormpaddle.nn.LayerNorm
torch.nn.LocalResponseNormpaddle.nn.LocalResponseNorm
torch.nn.RNNBasepaddle.nn.RNNCellBase
torch.nn.RNNpaddle.nn.RNN
torch.nn.LSTMpaddle.nn.LSTM
torch.nn.GRUpaddle.nn.GRU
torch.nn.RNNCellpaddle.nn.RNNCellBase
torch.nn.LSTMCellpaddle.nn.LSTMCell
torch.nn.GRUCellpaddle.nn.GRUCell
torch.nn.Transformerpaddle.nn.Transformer
torch.nn.TransformerEncoderpaddle.nn.TransformerEncoder
torch.nn.TransformerDecoderpaddle.nn.TransformerDecoder
torch.nn.TransformerEncoderLayerpaddle.nn.TransformerEncoderLayer
torch.nn.TransformerDecoderLayerpaddle.nn.TransformerDecoderLayer
torch.nn.Linearpaddle.nn.Linear
torch.nn.Bilinearpaddle.nn.Bilinear
torch.nn.Dropoutpaddle.nn.Dropout
torch.nn.Dropout2dpaddle.nn.Dropout2D
torch.nn.Dropout3dpaddle.nn.Dropout3D
torch.nn.AlphaDropoutpaddle.nn.AlphaDropout
torch.nn.Embeddingpaddle.nn.Embedding
torch.nn.CosineSimilaritypaddle.nn.CosineSimilarity
torch.nn.PairwiseDistancepaddle.nn.PairwiseDistance
torch.nn.L1Losspaddle.nn.L1Loss
torch.nn.MSELosspaddle.nn.MSELoss
torch.nn.CrossEntropyLosspaddle.nn.CrossEntropyLoss
torch.nn.CTCLosspaddle.nn.CTCLoss
torch.nn.NLLLosspaddle.nn.NLLLoss
torch.nn.KLDivLosspaddle.nn.KLDivLoss
torch.nn.BCELosspaddle.nn.BCELoss
torch.nn.BCEWithLogitsLosspaddle.nn.BCEWithLogitsLoss
torch.nn.MarginRankingLosspaddle.nn.MarginRankingLoss
torch.nn.SmoothL1Losspaddle.nn.SmoothL1Loss
torch.nn.PixelShufflepaddle.nn.PixelShuffle
torch.nn.Upsamplepaddle.nn.Upsample
torch.nn.UpsamplingNearest2dpaddle.nn.UpsamplingNearest2D
torch.nn.UpsamplingBilinear2dpaddle.nn.UpsamplingBilinear2D
torch.nn.DataParallelpaddle.DataParallel
torch.weight_normpaddle.nn.utils.weight_norm
torch.remove_weight_normpaddle.nn.utils.remove_weight_norm
torch.spectral_normpaddle.static.nn.spectral_norm
torch.nn.Flattenpaddle.nn.Flatten
torch.nn.functional.avg_pool1dpaddle.nn.functional.avg_pool1d
torch.nn.functional.thresholdpaddle.nn.functional.thresholded_relu
torch.nn.functional.batch_normpaddle.nn.functional.batch_norm
torch.nn.functional.linearpaddle.nn.functional.linear
torch.nn.functional.dropoutpaddle.nn.functional.dropout
torch.nn.functional.embeddingpaddle.nn.functional.embedding
torch.nn.functional.binary_cross_entropypaddle.nn.functional.binary_cross_entropy
torch.nn.functional.pixel_shufflepaddle.nn.functional.pixel_shuffle
torch.nn.functional.conv1dpaddle.nn.functional.conv1d
torch.nn.functional.conv2dpaddle.nn.functional.conv2d
torch.nn.functional.conv3dpaddle.nn.functional.conv3d
torch.nn.functional.conv_transpose1dpaddle.nn.functional.conv1d_transpose
torch.nn.functional.conv_transpose2dpaddle.nn.functional.conv2d_transpose
torch.nn.functional.conv_transpose3dpaddle.nn.functional.conv3d_transpose
torch.nn.functional.unfoldpaddle.nn.functional.unfold
torch.nn.functional.avg_pool2dpaddle.nn.functional.avg_pool2d
torch.nn.functional.avg_pool3dpaddle.nn.functional.avg_pool3d
torch.nn.functional.max_pool1dpaddle.nn.functional.max_pool1d
torch.nn.functional.max_pool2dpaddle.nn.functional.max_pool2d
torch.nn.functional.max_pool3dpaddle.nn.functional.max_pool3d
torch.nn.functional.adaptive_max_pool1dpaddle.nn.functional.adaptive_max_pool1d
torch.nn.functional.adaptive_max_pool2dpaddle.nn.functional.adaptive_max_pool2d
torch.nn.functional.adaptive_max_pool3dpaddle.nn.functional.adaptive_max_pool3d
torch.nn.functional.adaptive_avg_pool1dpaddle.nn.functional.adaptive_avg_pool1d
torch.nn.functional.adaptive_avg_pool2dpaddle.nn.functional.adaptive_avg_pool2d
torch.nn.functional.adaptive_avg_pool3dpaddle.nn.functional.adaptive_avg_pool3d
torch.nn.functional.relupaddle.nn.functional.relu
torch.nn.functional.hardtanhpaddle.nn.functional.hardtanh
torch.nn.functional.hardswishpaddle.nn.functional.hardswish
torch.nn.functional.relu6paddle.nn.functional.relu6
torch.nn.functional.elupaddle.nn.functional.elu
torch.nn.functional.selupaddle.nn.functional.selu
torch.nn.functional.leaky_relupaddle.nn.functional.leaky_relu
torch.nn.functional.prelupaddle.nn.functional.prelu
torch.nn.functional.gelupaddle.nn.functional.gelu
torch.nn.functional.logsigmoidpaddle.nn.functional.log_sigmoid
torch.nn.functional.hardshrinkpaddle.nn.functional.hardshrink
torch.nn.functional.tanhshrinkpaddle.nn.functional.tanhshrink
torch.nn.functional.softsignpaddle.nn.functional.softsign
torch.nn.functional.softpluspaddle.nn.functional.softplus
torch.nn.functional.softmaxpaddle.nn.functional.softmax
torch.nn.functional.softshrinkpaddle.nn.functional.softshrink
torch.nn.functional.log_softmaxpaddle.nn.functional.log_softmax
torch.nn.functional.tanhpaddle.tanh
torch.nn.functional.sigmoidpaddle.nn.functional.sigmoid
torch.nn.functional.hardsigmoidpaddle.nn.functional.hardsigmoid
torch.nn.functional.relu_paddle.nn.functional.relu_
torch.nn.functional.elu_paddle.nn.functional.elu_
torch.nn.functional.instance_normpaddle.nn.functional.instance_norm
torch.nn.functional.layer_normpaddle.nn.functional.layer_norm
torch.nn.functional.local_response_normpaddle.nn.functional.local_response_norm
torch.nn.functional.normalizepaddle.nn.functional.normalize
torch.nn.functional.bilinearpaddle.nn.functional.bilinear
torch.nn.functional.alpha_dropoutpaddle.nn.functional.alpha_dropout
torch.nn.functional.dropout2dpaddle.nn.functional.dropout2d
torch.nn.functional.dropout3dpaddle.nn.functional.dropout3d
torch.nn.functional.one_hotpaddle.nn.functional.one_hot
torch.nn.functional.cosine_similaritypaddle.nn.functional.cosine_similarity
torch.nn.functional.binary_cross_entropy_with_logitspaddle.nn.functional.binary_cross_entropy_with_logits
torch.nn.functional.cross_entropypaddle.nn.functional.cross_entropy
torch.nn.functional.ctc_losspaddle.nn.functional.ctc_loss
torch.nn.functional.kl_divpaddle.nn.functional.kl_div
torch.nn.functional.l1_losspaddle.nn.functional.l1_loss
torch.nn.functional.mse_losspaddle.nn.functional.mse_loss
torch.nn.functional.margin_ranking_losspaddle.nn.functional.margin_ranking_loss
torch.nn.functional.nll_losspaddle.nn.functional.nll_loss
torch.nn.functional.smooth_l1_losspaddle.nn.functional.smooth_l1_loss
torch.nn.functional.padpaddle.nn.functional.pad
torch.nn.functional.interpolatepaddle.nn.functional.interpolate
torch.nn.functional.upsamplepaddle.nn.functional.upsample
torch.nn.functional.grid_samplepaddle.nn.functional.grid_sample
torch.nn.functional.affine_gridpaddle.nn.functional.affine_grid
torch.random.get_rng_state()paddle.get_cuda_rng_state
torch.random.manual_seed(seed)paddle.seed
torch.random.seed()paddle.seed
torch.random.set_rng_state(new_state)paddle.set_cuda_rng_stata
torch.optim.Optimizerpaddle.optimizer.Optimizer
torch.optim.Adadeltapaddle.optimizer.Adadelta
torch.optim.Adagradpaddle.optimizer.Adagrad
torch.optim.Adampaddle.optimizer.Adam
torch.optim.AdamWpaddle.optimizer.AdamW
torch.optim.Adamaxpaddle.optimizer.Adamax
torch.optim.RMSproppaddle.optimizer.RMSProp
torch.optim.SGDpaddle.optimizer.SGD
torch.optim.lr_scheduler.LambdaLRpaddle.optimizer.lr.LambdaDecay
torch.optim.lr_scheduler.StepLRpaddle.optimizer.lr.StepDecay
torch.optim.lr_scheduler.MultiStepLRpaddle.optimizer.lr.MultiStepDecay
torch.optim.lr_scheduler.ExponentialLRpaddle.optimizer.lr.ExponentialDecay
torch.optim.lr_scheduler.CosineAnnealingLRpaddle.optimizer.lr.CosineAnnealingDecay
torch.optim.lr_scheduler.ReduceLROnPlateaupaddle.optimizer.lr.ReduceOnPlateau
torch.nn.Modulepaddle.nn.Layer
Logo

学大模型,用大模型上飞桨星河社区!每天8点V100G算力免费领!免费领取ERNIE 4.0 100w Token >>>

更多推荐