Tensor.new_tensor
|
返回一个新的 Tensor,其数据为 data 。 |
Tensor.new_full
|
返回一个大小为 size ,填充为 fill_value 的 Tensor 。 |
Tensor.new_empty
|
返回一个大小为 size 的 Tensor,其中包含未初始化的数据。 |
Tensor.new_ones
|
返回一个大小为 size 的 Tensor,其中填充了 1 。 |
Tensor.new_zeros
|
返回一个大小为 size 的 Tensor,其中填充了 0 。 |
Tensor.is_cuda
|
如果 Tensor 存储在 GPU 上,则为 True ,否则为 False 。 |
Tensor.is_quantized
|
如果张量是量化的,则为 True ;否则为 False 。 |
Tensor.is_meta
|
如果张量是元张量,则为 True ;否则为 False 。 |
Tensor.device
|
这是该张量的 torch.device 位置。 |
Tensor.grad
|
此属性默认为 None ,并在第一次调用 backward() 计算 self 的梯度时变为 Tensor。 |
Tensor.ndim
|
dim() 的别名。 |
Tensor.real
|
返回一个新的张量,其中包含复数值输入张量的 self 张量的实数值。 |
Tensor.imag
|
返回一个包含 self 张量虚部的新张量。 |
Tensor.nbytes
|
如果张量不使用稀疏存储布局,则返回元素 "view" 消耗的字节数。 |
Tensor.itemsize
|
element_size() 的别名。 |
Tensor.abs
|
查看 torch.abs() |
Tensor.abs_
|
abs() 的就地版本。 |
Tensor.absolute
|
abs() 的别名。 |
Tensor.absolute_
|
absolute() 的就地版本。 abs_() 的别名。 |
Tensor.acos
|
查看 torch.acos() |
Tensor.acos_
|
acos() 的就地版本 |
Tensor.arccos
|
查看 torch.arccos() |
Tensor.arccos_
|
arccos() 的就地版本 |
Tensor.add
|
向 self 张量添加一个标量或张量。 |
Tensor.add_
|
add() 的就地版本 |
Tensor.addbmm
|
查看 torch.addbmm() |
Tensor.addbmm_
|
原地版本 addbmm() |
Tensor.addcdiv
|
查看 torch.addcdiv() |
Tensor.addcdiv_
|
原地版本 addcdiv() |
Tensor.addcmul
|
查看 torch.addcmul() |
Tensor.addcmul_
|
原地版本 addcmul() |
Tensor.addmm
|
查看 torch.addmm() |
Tensor.addmm_
|
原地版本 addmm() |
Tensor.sspaddmm
|
查看 torch.sspaddmm() |
Tensor.addmv
|
查看 torch.addmv() |
Tensor.addmv_
|
addmv() 的就地版本 |
Tensor.addr
|
查看 torch.addr() |
Tensor.addr_
|
addr() 的就地版本 |
Tensor.adjoint
|
adjoint() 的别名。 |
Tensor.allclose
|
查看 torch.allclose() |
Tensor.amax
|
查看 torch.amax() |
Tensor.amin
|
查看 torch.amin() |
Tensor.aminmax
|
查看 torch.aminmax() |
Tensor.angle
|
查看 torch.angle() |
Tensor.apply_
|
将函数 callable 应用到张量的每个元素上,用 callable 返回的值替换每个元素。 |
Tensor.argmax
|
查看 torch.argmax() |
Tensor.argmin
|
查看 torch.argmin() |
Tensor.argsort
|
查看 torch.argsort() |
Tensor.argwhere
|
查看 torch.argwhere() |
Tensor.asin
|
查看 torch.asin() |
Tensor.asin_
|
asin() 的就地版本 |
Tensor.arcsin
|
查看 torch.arcsin() |
Tensor.arcsin_
|
原地版本 arcsin() |
Tensor.as_strided
|
查看 torch.as_strided() |
Tensor.atan
|
查看 torch.atan() |
Tensor.atan_
|
原地版本 atan() |
Tensor.arctan
|
查看 torch.arctan() |
Tensor.arctan_
|
原地版本 arctan() |
Tensor.atan2
|
查看 torch.atan2() |
Tensor.atan2_
|
原地版本 atan2() |
Tensor.arctan2
|
查看 torch.arctan2() |
Tensor.arctan2_
|
atan2_(other) -> 张量 |
Tensor.all
|
查看 torch.all() |
Tensor.any
|
查看 torch.any() |
Tensor.backward
|
计算当前张量相对于图叶子的梯度。 |
Tensor.baddbmm
|
查看 torch.baddbmm() |
Tensor.baddbmm_
|
baddbmm() 的就地版本 |
Tensor.bernoulli
|
返回一个结果张量,其中每个 result[i] 都独立地从 Bernoulli(self[i]) 中采样。 |
Tensor.bernoulli_
|
将 self 的每个位置填充为从 Bernoulli(p) 中独立采样的样本。 |
Tensor.bfloat16
|
self.bfloat16() 等同于 self.to(torch.bfloat16) 。 |
Tensor.bincount
|
查看 torch.bincount() |
Tensor.bitwise_not
|
查看 torch.bitwise_not() |
Tensor.bitwise_not_
|
bitwise_not() 的就地版本 |
Tensor.bitwise_and
|
查看 torch.bitwise_and() |
Tensor.bitwise_and_
|
bitwise_and() 的就地版本 |
Tensor.bitwise_or
|
查看 torch.bitwise_or() |
Tensor.bitwise_or_
|
bitwise_or() 的就地版本 |
Tensor.bitwise_xor
|
查看 torch.bitwise_xor() |
Tensor.bitwise_xor_
|
原位版本 bitwise_xor() |
Tensor.bitwise_left_shift
|
查看 torch.bitwise_left_shift() |
Tensor.bitwise_left_shift_
|
原位版本 bitwise_left_shift() |
Tensor.bitwise_right_shift
|
查看 torch.bitwise_right_shift() |
Tensor.bitwise_right_shift_
|
原位版本 bitwise_right_shift() |
Tensor.bmm
|
查看 torch.bmm() |
Tensor.bool
|
self.bool() 等价于 self.to(torch.bool) 。 |
Tensor.byte
|
self.byte() 等同于 self.to(torch.uint8) 。 |
Tensor.broadcast_to
|
见 torch.broadcast_to() 。 |
Tensor.cauchy_
|
填充张量,其中的数字来自柯西分布: |
Tensor.ceil
|
查看 torch.ceil() |
Tensor.ceil_
|
原地版本 ceil() |
Tensor.char
|
self.char() 等同于 self.to(torch.int8) 。 |
Tensor.cholesky
|
查看 torch.cholesky() |
Tensor.cholesky_inverse
|
查看 torch.cholesky_inverse() |
Tensor.cholesky_solve
|
查看 torch.cholesky_solve() |
Tensor.chunk
|
查看 torch.chunk() |
Tensor.clamp
|
查看 torch.clamp() |
Tensor.clamp_
|
clamp() 的就地版本 |
Tensor.clip
|
clamp() 的别名 |
Tensor.clip_
|
clamp_() 的别名 |
Tensor.clone
|
查看 torch.clone() |
Tensor.contiguous
|
返回一个包含与 self 张量相同数据的连续内存张量。 |
Tensor.copy_
|
将 src 中的元素复制到 self 张量中,并返回 self 。 |
Tensor.conj
|
查看 torch.conj() |
Tensor.conj_physical
|
查看 torch.conj_physical() |
Tensor.conj_physical_
|
conj_physical() 的就地版本 |
Tensor.resolve_conj
|
查看 torch.resolve_conj() |
Tensor.resolve_neg
|
查看 torch.resolve_neg() |
Tensor.copysign
|
查看 torch.copysign() |
Tensor.copysign_
|
copysign() 的就地版本 |
Tensor.cos
|
查看 torch.cos() |
Tensor.cos_
|
原地版本 cos() |
Tensor.cosh
|
查看 torch.cosh() |
Tensor.cosh_
|
原地版本 cosh() |
Tensor.corrcoef
|
查看 torch.corrcoef() |
Tensor.count_nonzero
|
查看 torch.count_nonzero() |
Tensor.cov
|
查看 torch.cov() |
Tensor.acosh
|
查看 torch.acosh() |
Tensor.acosh_
|
原地版本 acosh() |
Tensor.arccosh
|
acosh() -> 张量 |
Tensor.arccosh_
|
acosh_() -> 索引 |
Tensor.cpu
|
返回此对象在 CPU 内存中的副本。 |
Tensor.cross
|
查看 torch.cross() |
Tensor.cuda
|
返回此对象在 CUDA 内存中的副本。 |
Tensor.logcumsumexp
|
查看 torch.logcumsumexp() |
Tensor.cummax
|
查看 torch.cummax() |
Tensor.cummin
|
查看 torch.cummin() |
Tensor.cumprod
|
查看 torch.cumprod() |
Tensor.cumprod_
|
cumprod() 的就地版本。 |
Tensor.cumsum
|
查看 torch.cumsum() |
Tensor.cumsum_
|
cumsum() 的原地版本 |
Tensor.chalf
|
self.chalf() 等价于 self.to(torch.complex32) 。 |
Tensor.cfloat
|
self.cfloat() 等价于 self.to(torch.complex64) 。 |
Tensor.cdouble
|
self.cdouble() 等价于 self.to(torch.complex128) 。 |
Tensor.data_ptr
|
返回 self 张量的第一个元素的地址。 |
Tensor.deg2rad
|
查看 torch.deg2rad() |
Tensor.dequantize
|
给定一个量化张量,对其进行去量化并返回去量化的浮点张量。 |
Tensor.det
|
查看 torch.det() |
Tensor.dense_dim
|
返回稀疏张量 self 的稠密维度数量。 |
Tensor.detach
|
返回一个新的 Tensor,与当前图分离。 |
Tensor.detach_
|
从创建它的图中分离张量,使其成为叶子节点。 |
Tensor.diag
|
查看 torch.diag() |
Tensor.diag_embed
|
查看 torch.diag_embed() |
Tensor.diagflat
|
查看 torch.diagflat() |
Tensor.diagonal
|
查看 torch.diagonal() |
Tensor.diagonal_scatter
|
查看 torch.diagonal_scatter() |
Tensor.fill_diagonal_
|
填充至少有 2 维度的张量的主对角线。 |
Tensor.fmax
|
查看 torch.fmax() |
Tensor.fmin
|
查看 torch.fmin() |
Tensor.diff
|
查看 torch.diff() |
Tensor.digamma
|
查看 torch.digamma() |
Tensor.digamma_
|
digamma() 的就地版本。 |
Tensor.dim
|
返回 self 张量的维度数。 |
Tensor.dim_order
|
返回唯一确定的描述维度顺序或物理布局的 int 元组。 |
Tensor.dist
|
查看 torch.dist() |
Tensor.div
|
查看 torch.div() |
Tensor.div_
|
div() 的就地版本。 |
Tensor.divide
|
查看 torch.divide() |
Tensor.divide_
|
divide() 的就地版本。 |
Tensor.dot
|
查看 torch.dot() |
Tensor.double
|
self.double() 等价于 self.to(torch.float64) 。 |
Tensor.dsplit
|
查看 torch.dsplit() |
Tensor.element_size
|
返回单个元素的字节大小。 |
Tensor.eq
|
查看 torch.eq() |
Tensor.eq_
|
eq() 的就地版本。 |
Tensor.equal
|
查看 torch.equal() |
Tensor.erf
|
查看 torch.erf() |
Tensor.erf_
|
erf() 的就地版本。 |
Tensor.erfc
|
查看 torch.erfc() |
Tensor.erfc_
|
原地版本 erfc() |
Tensor.erfinv
|
查看 torch.erfinv() |
Tensor.erfinv_
|
原地版本 erfinv() |
Tensor.exp
|
查看 torch.exp() |
Tensor.exp_
|
原地版本 exp() |
Tensor.expm1
|
查看 torch.expm1() |
Tensor.expm1_
|
原地版本 expm1() |
Tensor.expand
|
返回 self 张量的新视图,将单例维度扩展到更大的大小。 |
Tensor.expand_as
|
将此张量扩展到与 other 相同的大小。 |
Tensor.exponential_
|
用 PDF(概率密度函数)中的元素填充 self 张量: |
Tensor.fix
|
见 torch.fix() 。 |
Tensor.fix_
|
fix() 的就地版本。 |
Tensor.fill_
|
用指定的值填充 self 张量。 |
Tensor.flatten
|
查看 torch.flatten() |
Tensor.flip
|
查看 torch.flip() |
Tensor.fliplr
|
查看 torch.fliplr() |
Tensor.flipud
|
查看 torch.flipud() |
Tensor.float
|
self.float() 与 self.to(torch.float32) 等价。 |
Tensor.float_power
|
查看 torch.float_power() |
Tensor.float_power_
|
原地版本 float_power() |
Tensor.floor
|
查看 torch.floor() |
Tensor.floor_
|
原地版本 floor() |
Tensor.floor_divide
|
查看 torch.floor_divide() |
Tensor.floor_divide_
|
原地版本 floor_divide() |
Tensor.fmod
|
查看 torch.fmod() |
Tensor.fmod_
|
原地版本 fmod() |
Tensor.frac
|
查看 torch.frac() |
Tensor.frac_
|
frac() 的就地版本 |
Tensor.frexp
|
查看 torch.frexp() |
Tensor.gather
|
查看 torch.gather() |
Tensor.gcd
|
查看 torch.gcd() |
Tensor.gcd_
|
gcd() 的就地版本 |
Tensor.ge
|
见 torch.ge() 。 |
Tensor.ge_
|
ge() 的就地版本。 |
Tensor.greater_equal
|
见 torch.greater_equal() 。 |
Tensor.greater_equal_
|
greater_equal() 的就地版本。 |
Tensor.geometric_
|
用几何分布的元素填充 self 张量: |
Tensor.geqrf
|
查看 torch.geqrf() |
Tensor.ger
|
查看 torch.ger() |
Tensor.get_device
|
对于 CUDA 张量,此函数返回张量所在的 GPU 的设备序号。 |
Tensor.gt
|
见 torch.gt() 。 |
Tensor.gt_
|
gt() 的就地版本。 |
Tensor.greater
|
见 torch.greater() 。 |
Tensor.greater_
|
greater() 的就地版本。 |
Tensor.half
|
self.half() 等同于 self.to(torch.float16) 。 |
Tensor.hardshrink
|
查看 torch.nn.functional.hardshrink() |
Tensor.heaviside
|
查看 torch.heaviside() |
Tensor.histc
|
查看 torch.histc() |
Tensor.histogram
|
查看 torch.histogram() |
Tensor.hsplit
|
查看 torch.hsplit() |
Tensor.hypot
|
查看 torch.hypot() |
Tensor.hypot_
|
hypot() 的就地版本 |
Tensor.i0
|
查看 torch.i0() |
Tensor.i0_
|
i0() 的就地版本 |
Tensor.igamma
|
查看 torch.igamma() |
Tensor.igamma_
|
igamma() 的就地版本 |
Tensor.igammac
|
查看 torch.igammac() |
Tensor.igammac_
|
igammac() 的就地版本 |
Tensor.index_add_
|
将 alpha 的元素累加到 self 张量中,累加次数为 source ,并按照 index 中给出的顺序添加到索引。 |
Tensor.index_add
|
torch.Tensor.index_add_() 的非就地版本。 |
Tensor.index_copy_
|
通过选择 index 中给出的顺序,将 tensor 的元素复制到 self 张量中。 |
Tensor.index_copy
|
torch.Tensor.index_copy_() 的不合适版本。 |
Tensor.index_fill_
|
通过选择在 index 中给出的顺序,将值 value 填充到 self 张量的元素中。 |
Tensor.index_fill
|
torch.Tensor.index_fill_() 的不合适版本。 |
Tensor.index_put_
|
使用指定的索引(索引是一个张量元组)将张量 values 的值放入张量 self 中。 |
Tensor.index_put
|
index_put_() 的错位版本。 |
Tensor.index_reduce_
|
将 source 的元素累积到 self 张量中,按照 index 中给出的顺序累积到索引,使用 reduce 参数指定的累加方式。 |
Tensor.index_reduce
|
|
Tensor.index_select
|
查看 torch.index_select() |
Tensor.indices
|
返回稀疏 COO 张量的索引张量。 |
Tensor.inner
|
见 torch.inner() 。 |
Tensor.int
|
self.int() 等价于 self.to(torch.int32) 。 |
Tensor.int_repr
|
给定一个量化张量, self.int_repr() 返回一个以 uint8_t 作为数据类型的 CPU 张量,该张量存储了给定张量的底层 uint8_t 值。 |
Tensor.inverse
|
查看 torch.inverse() |
Tensor.isclose
|
查看 torch.isclose() |
Tensor.isfinite
|
查看 torch.isfinite() |
Tensor.isinf
|
查看 torch.isinf() |
Tensor.isposinf
|
查看 torch.isposinf() |
Tensor.isneginf
|
查看 torch.isneginf() |
Tensor.isnan
|
查看 torch.isnan() |
Tensor.is_contiguous
|
如果 self 张量在内存中按指定的内存格式连续,则返回 True。 |
Tensor.is_complex
|
如果 self 的数据类型是复杂数据类型,则返回 True。 |
Tensor.is_conj
|
如果 self 的共轭位设置为 true,则返回 True。 |
Tensor.is_floating_point
|
如果 self 的数据类型是浮点数据类型,则返回 True。 |
Tensor.is_inference
|
查看 torch.is_inference() |
Tensor.is_leaf
|
所有具有 requires_grad 且为 False 的 Tensor 都将按照惯例成为叶子 Tensor。 |
Tensor.is_pinned
|
返回此张量是否位于固定内存中。 |
Tensor.is_set_to
|
如果两个张量指向完全相同的内存(相同的存储、偏移、大小和步长),则返回 True。 |
Tensor.is_shared
|
检查张量是否在共享内存中。 |
Tensor.is_signed
|
如果 self 的数据类型是有符号数据类型,则返回 True。 |
Tensor.is_sparse
|
如果张量使用稀疏 COO 存储布局,则为 True ,否则为 False 。 |
Tensor.istft
|
查看 torch.istft() |
Tensor.isreal
|
查看 torch.isreal() |
Tensor.item
|
返回此张量的标准 Python 数值。 |
Tensor.kthvalue
|
查看 torch.kthvalue() |
Tensor.lcm
|
查看 torch.lcm() |
Tensor.lcm_
|
lcm() 的就地版本。 |
Tensor.ldexp
|
查看 torch.ldexp() |
Tensor.ldexp_
|
ldexp() 的就地版本。 |
Tensor.le
|
见 torch.le() 。 |
Tensor.le_
|
le() 的就地版本。 |
Tensor.less_equal
|
见 torch.less_equal() 。 |
Tensor.less_equal_
|
less_equal() 的就地版本。 |
Tensor.lerp
|
查看 torch.lerp() |
Tensor.lerp_
|
原地版本 lerp() |
Tensor.lgamma
|
查看 torch.lgamma() |
Tensor.lgamma_
|
原地版本 lgamma() |
Tensor.log
|
查看 torch.log() |
Tensor.log_
|
原地版本 log() |
Tensor.logdet
|
查看 torch.logdet() |
Tensor.log10
|
查看 torch.log10() |
Tensor.log10_
|
原地版本 log10() |
Tensor.log1p
|
查看 torch.log1p() |
Tensor.log1p_
|
原地版本 log1p() |
Tensor.log2
|
查看 torch.log2() |
Tensor.log2_
|
原地版本 log2() |
Tensor.log_normal_
|
使用给定的均值 μ 和标准差 σ 参数化的对数正态分布从日志中抽取样本填充 self 张量。 |
Tensor.logaddexp
|
查看 torch.logaddexp() |
Tensor.logaddexp2
|
查看 torch.logaddexp2() |
Tensor.logsumexp
|
查看 torch.logsumexp() |
Tensor.logical_and
|
查看 torch.logical_and() |
Tensor.logical_and_
|
原地版本 logical_and() |
Tensor.logical_not
|
查看 torch.logical_not() |
Tensor.logical_not_
|
原地版本 logical_not() |
Tensor.logical_or
|
查看 torch.logical_or() |
Tensor.logical_or_
|
原地版本 logical_or() |
Tensor.logical_xor
|
查看 torch.logical_xor() |
Tensor.logical_xor_
|
原地版本 logical_xor() |
Tensor.logit
|
查看 torch.logit() |
Tensor.logit_
|
原地版本 logit() |
Tensor.long
|
self.long() 等价于 self.to(torch.int64) 。 |
Tensor.lt
|
见 torch.lt() 。 |
Tensor.lt_
|
lt() 的就地版本。 |
Tensor.less
|
lt(other) -> 张量 |
Tensor.less_
|
less() 的就地版本。 |
Tensor.lu
|
查看 torch.lu() |
Tensor.lu_solve
|
查看 torch.lu_solve() |
Tensor.as_subclass
|
创建一个与 self 具有相同数据指针的 cls 实例。 |
Tensor.map_
|
对每个元素在 self 张量中应用 callable ,并将结果存储在 self 张量中。 |
Tensor.masked_scatter_
|
将 source 中的元素复制到 self 张量中,位置由 mask 为 True 确定。 |
Tensor.masked_scatter
|
torch.Tensor.masked_scatter_() 的非原地版本。 |
Tensor.masked_fill_
|
当 mask 为 True 时,用 value 填充 self 张量的元素。 |
Tensor.masked_fill
|
torch.Tensor.masked_fill_() 的错位版本 |
Tensor.masked_select
|
查看 torch.masked_select() |
Tensor.matmul
|
查看 torch.matmul() |
Tensor.matrix_power
|
注意
matrix_power() 已弃用,请使用 torch.linalg.matrix_power() 代替。
|
Tensor.matrix_exp
|
查看 torch.matrix_exp() |
Tensor.max
|
查看 torch.max() |
Tensor.maximum
|
查看 torch.maximum() |
Tensor.mean
|
查看 torch.mean() |
Tensor.module_load
|
定义如何在 load_state_dict() 中加载 other 时将其转换为 self 。 |
Tensor.nanmean
|
查看 torch.nanmean() |
Tensor.median
|
查看 torch.median() |
Tensor.nanmedian
|
查看 torch.nanmedian() |
Tensor.min
|
查看 torch.min() |
Tensor.minimum
|
查看 torch.minimum() |
Tensor.mm
|
查看 torch.mm() |
Tensor.smm
|
查看 torch.smm() |
Tensor.mode
|
查看 torch.mode() |
Tensor.movedim
|
查看 torch.movedim() |
Tensor.moveaxis
|
查看 torch.moveaxis() |
Tensor.msort
|
查看 torch.msort() |
Tensor.mul
|
见 torch.mul() 。 |
Tensor.mul_
|
mul() 的就地版本。 |
Tensor.multiply
|
见 torch.multiply() 。 |
Tensor.multiply_
|
multiply() 的就地版本。 |
Tensor.multinomial
|
查看 torch.multinomial() |
Tensor.mv
|
查看 torch.mv() |
Tensor.mvlgamma
|
查看 torch.mvlgamma() |
Tensor.mvlgamma_
|
mvlgamma() 的本地版本 |
Tensor.nansum
|
查看 torch.nansum() |
Tensor.narrow
|
见 torch.narrow() 。 |
Tensor.narrow_copy
|
见 torch.narrow_copy() 。 |
Tensor.ndimension
|
dim() 的别名。 |
Tensor.nan_to_num
|
见 torch.nan_to_num() 。 |
Tensor.nan_to_num_
|
nan_to_num() 的就地版本。 |
Tensor.ne
|
见 torch.ne() 。 |
Tensor.ne_
|
ne() 的就地版本。 |
Tensor.not_equal
|
见 torch.not_equal() 。 |
Tensor.not_equal_
|
not_equal() 的就地版本。 |
Tensor.neg
|
查看 torch.neg() |
Tensor.neg_
|
原地版本 neg() |
Tensor.negative
|
查看 torch.negative() |
Tensor.negative_
|
原地版本 negative() |
Tensor.nelement
|
numel() 的别名。 |
Tensor.nextafter
|
查看 torch.nextafter() |
Tensor.nextafter_
|
原地版本 nextafter() |
Tensor.nonzero
|
查看 torch.nonzero() |
Tensor.norm
|
查看 torch.norm() |
Tensor.normal_
|
将 self 张量填充为从由 mean 和 std 参数化的正态分布中抽取的样本元素。 |
Tensor.numel
|
查看 torch.numel() |
Tensor.numpy
|
返回张量作为 NumPy ndarray 。 |
Tensor.orgqr
|
查看 torch.orgqr() |
Tensor.ormqr
|
查看 torch.ormqr() |
Tensor.outer
|
见 torch.outer() 。 |
Tensor.permute
|
查看 torch.permute() |
Tensor.pin_memory
|
如果张量尚未固定,则将其复制到固定内存。 |
Tensor.pinverse
|
查看 torch.pinverse() |
Tensor.polygamma
|
查看 torch.polygamma() |
Tensor.polygamma_
|
polygamma() 的就地版本 |
Tensor.positive
|
查看 torch.positive() |
Tensor.pow
|
查看 torch.pow() |
Tensor.pow_
|
pow() 的就地版本 |
Tensor.prod
|
查看 torch.prod() |
Tensor.put_
|
将 source 中的元素复制到由 index 指定的位置。 |
Tensor.qr
|
查看 torch.qr() |
Tensor.qscheme
|
返回给定 QTensor 的量化方案。 |
Tensor.quantile
|
查看 torch.quantile() |
Tensor.nanquantile
|
查看 torch.nanquantile() |
Tensor.q_scale
|
给定一个通过线性(仿射)量化量化的张量,返回底层量化器的尺度()。 |
Tensor.q_zero_point
|
给定一个通过线性(仿射)量化量化的张量,返回底层量化器的零点()。 |
Tensor.q_per_channel_scales
|
给定一个通过线性(仿射)按通道量化的张量,返回底层量化器的尺度张量。 |
Tensor.q_per_channel_zero_points
|
给定一个通过线性(仿射)按通道量化的张量,返回底层量化器的零点张量。 |
Tensor.q_per_channel_axis
|
给定一个通过线性(仿射)按通道量化的张量,返回应用按通道量化的维度索引。 |
Tensor.rad2deg
|
查看 torch.rad2deg() |
Tensor.random_
|
将 self 张量填充为从离散均匀分布中采样的数字。 |
Tensor.ravel
|
查看 torch.ravel() 。 |
Tensor.reciprocal
|
查看 torch.reciprocal() |
Tensor.reciprocal_
|
原位版本 reciprocal() |
Tensor.record_stream
|
标记张量已被此流使用。 |
Tensor.register_hook
|
注册反向钩子。 |
Tensor.register_post_accumulate_grad_hook
|
注册在梯度累积之后运行的回退钩子。 |
Tensor.remainder
|
查看 torch.remainder() |
Tensor.remainder_
|
原位版本 remainder() |
Tensor.renorm
|
查看 torch.renorm() |
Tensor.renorm_
|
原位版本 renorm() |
Tensor.repeat
|
沿指定维度重复此张量。 |
Tensor.repeat_interleave
|
见 torch.repeat_interleave() 。 |
Tensor.requires_grad
|
如果需要为此张量计算梯度,则使用 True ;否则使用 False 。 |
Tensor.requires_grad_
|
如果 autograd 应记录此张量的操作:则就地设置此张量的 requires_grad 属性。 |
Tensor.reshape
|
返回一个具有与 self 相同数据和元素数量的张量,但具有指定的形状。 |
Tensor.reshape_as
|
以与 other 相同的形状返回此张量。 |
Tensor.resize_
|
将 self 张量调整到指定的大小。 |
Tensor.resize_as_
|
将 self 张量调整大小,使其与指定的 tensor 大小相同。 |
Tensor.retain_grad
|
允许这个张量在 backward() 期间填充 grad 。 |
Tensor.retains_grad
|
如果此张量是非叶节点且其 grad 在 backward() 时启用以填充,则返回 True ,否则返回 False 。 |
Tensor.roll
|
查看 torch.roll() |
Tensor.rot90
|
查看 torch.rot90() |
Tensor.round
|
查看 torch.round() |
Tensor.round_
|
round() 的就地版本 |
Tensor.rsqrt
|
查看 torch.rsqrt() |
Tensor.rsqrt_
|
rsqrt() 的就地版本 |
Tensor.scatter
|
torch.Tensor.scatter_() 的非就地版本 |
Tensor.scatter_
|
将张量 src 中所有值写入 self ,索引由张量 index 指定。 |
Tensor.scatter_add_
|
将张量 src 中的所有值按 index 张量指定的索引添加到 self 中,类似于 scatter_() 。 |
Tensor.scatter_add
|
torch.Tensor.scatter_add_() 的非原地版本 |
Tensor.scatter_reduce_
|
使用通过 reduce 参数定义的应用的归约操作,将张量 src 中的所有值归约到 index 张量中指定的索引,结果存储在 self 张量中( "sum" , "prod" , "mean" , "amax" , "amin" )。 |
Tensor.scatter_reduce
|
torch.Tensor.scatter_reduce_() 的非原地版本 |
Tensor.select
|
查看 torch.select() |
Tensor.select_scatter
|
查看 torch.select_scatter() |
Tensor.set_
|
设置底层存储、大小和步长。 |
Tensor.share_memory_
|
将底层存储移动到共享内存。 |
Tensor.short
|
self.short() 等价于 self.to(torch.int16) 。 |
Tensor.sigmoid
|
查看 torch.sigmoid() |
Tensor.sigmoid_
|
sigmoid() 的就地版本。 |
Tensor.sign
|
查看 torch.sign() |
Tensor.sign_
|
原地版本 sign() |
Tensor.signbit
|
查看 torch.signbit() |
Tensor.sgn
|
查看 torch.sgn() |
Tensor.sgn_
|
原地版本 sgn() |
Tensor.sin
|
查看 torch.sin() |
Tensor.sin_
|
原地版本 sin() |
Tensor.sinc
|
查看 torch.sinc() |
Tensor.sinc_
|
原地版本 sinc() |
Tensor.sinh
|
查看 torch.sinh() |
Tensor.sinh_
|
sinh() 的就地版本 |
Tensor.asinh
|
查看 torch.asinh() |
Tensor.asinh_
|
asinh() 的就地版本 |
Tensor.arcsinh
|
查看 torch.arcsinh() |
Tensor.arcsinh_
|
arcsinh() 的就地版本 |
Tensor.shape
|
返回 self 张量的尺寸。 |
Tensor.size
|
返回 self 张量的尺寸。 |
Tensor.slogdet
|
查看 torch.slogdet() |
Tensor.slice_scatter
|
查看 torch.slice_scatter() |
Tensor.softmax
|
torch.nn.functional.softmax() 的别名 |
Tensor.sort
|
查看 torch.sort() |
Tensor.split
|
查看 torch.split() |
Tensor.sparse_mask
|
返回一个新的稀疏张量,其值来自步长张量 self ,并通过稀疏张量 mask 的索引进行过滤。 |
Tensor.sparse_dim
|
返回稀疏张量 self 中的稀疏维度数量。 |
Tensor.sqrt
|
查看 torch.sqrt() |
Tensor.sqrt_
|
sqrt() 的就地版本。 |
Tensor.square
|
查看 torch.square() |
Tensor.square_
|
原位版本 square() |
Tensor.squeeze
|
查看 torch.squeeze() |
Tensor.squeeze_
|
原位版本 squeeze() |
Tensor.std
|
查看 torch.std() |
Tensor.stft
|
查看 torch.stft() |
Tensor.storage
|
返回基础 TypedStorage |
Tensor.untyped_storage
|
返回基础 UntypedStorage |
Tensor.storage_offset
|
返回在底层存储中 self 张量的偏移量,以存储元素数量表示(不是字节数)。 |
Tensor.storage_type
|
返回底层存储的类型。 |
Tensor.stride
|
返回 self 张量的步长。 |
Tensor.sub
|
见 torch.sub() 。 |
Tensor.sub_
|
sub() 的就地版本。 |
Tensor.subtract
|
见 torch.subtract() 。 |
Tensor.subtract_
|
subtract() 的就地版本。 |
Tensor.sum
|
查看 torch.sum() |
Tensor.sum_to_size
|
将 this 张量转换为 size 。 |
Tensor.svd
|
查看 torch.svd() |
Tensor.swapaxes
|
查看 torch.swapaxes() |
Tensor.swapdims
|
查看 torch.swapdims() |
Tensor.t
|
查看 torch.t() |
Tensor.t_
|
t() 的就地版本。 |
Tensor.tensor_split
|
查看 torch.tensor_split() |
Tensor.tile
|
查看 torch.tile() |
Tensor.to
|
执行张量数据类型和/或设备转换。 |
Tensor.to_mkldnn
|
返回 torch.mkldnn 布局的张量副本。 |
Tensor.take
|
查看 torch.take() |
Tensor.take_along_dim
|
查看 torch.take_along_dim() |
Tensor.tan
|
查看 torch.tan() |
Tensor.tan_
|
原地版本 tan() |
Tensor.tanh
|
查看 torch.tanh() |
Tensor.tanh_
|
原地版本 tanh() |
Tensor.atanh
|
查看 torch.atanh() |
Tensor.atanh_
|
原地版本 atanh() |
Tensor.arctanh
|
查看 torch.arctanh() |
Tensor.arctanh_
|
arctanh() 的就地版本 |
Tensor.tolist
|
返回作为(嵌套)列表的张量。 |
Tensor.topk
|
查看 torch.topk() |
Tensor.to_dense
|
如果 self 不是一个带偏移量的张量,则创建 self 的带偏移量的副本,否则返回 self 。 |
Tensor.to_sparse
|
返回张量的稀疏副本。 |
Tensor.to_sparse_csr
|
将张量转换为压缩行存储格式(CSR)。 |
Tensor.to_sparse_csc
|
将张量转换为压缩列存储(CSC)格式。 |
Tensor.to_sparse_bsr
|
将张量转换为给定块大小的块稀疏行(BSR)存储格式。 |
Tensor.to_sparse_bsc
|
将张量转换为给定块大小的块稀疏列(BSC)存储格式。 |
Tensor.trace
|
查看 torch.trace() |
Tensor.transpose
|
查看 torch.transpose() |
Tensor.transpose_
|
原地版本 transpose() |
Tensor.triangular_solve
|
查看 torch.triangular_solve() |
Tensor.tril
|
查看 torch.tril() |
Tensor.tril_
|
原地版本 tril() |
Tensor.triu
|
查看 torch.triu() |
Tensor.triu_
|
原地版本 triu() |
Tensor.true_divide
|
查看 torch.true_divide() |
Tensor.true_divide_
|
原地版本 true_divide_() |
Tensor.trunc
|
查看 torch.trunc() |
Tensor.trunc_
|
trunc() 的本地版本 |
Tensor.type
|
如果未提供 dtype,则返回类型,否则将此对象转换为指定的类型。 |
Tensor.type_as
|
将此张量转换为给定张量的类型。 |
Tensor.unbind
|
查看 torch.unbind() |
Tensor.unflatten
|
见 torch.unflatten() 。 |
Tensor.unfold
|
返回原始张量的一个视图,该视图包含从 self 张量在 dimension 维度上的所有大小为 size 的切片。 |
Tensor.uniform_
|
使用连续均匀分布的数字填充 self 张量: |
Tensor.unique
|
返回输入张量中的唯一元素。 |
Tensor.unique_consecutive
|
删除每个连续等效元素组中除了第一个元素之外的所有元素。 |
Tensor.unsqueeze
|
查看 torch.unsqueeze() |
Tensor.unsqueeze_
|
unsqueeze() 的就地版本。 |
Tensor.values
|
返回稀疏 COO 张量的值张量。 |
Tensor.var
|
查看 torch.var() |
Tensor.vdot
|
查看 torch.vdot() |
Tensor.view
|
返回一个新张量,其数据与 self 张量相同,但类型不同 shape 。 |
Tensor.view_as
|
将此张量视为与 other 相同大小。 |
Tensor.vsplit
|
查看 torch.vsplit() |
Tensor.where
|
self.where(condition, y) 与 torch.where(condition, self, y) 等价。 |
Tensor.xlogy
|
查看 torch.xlogy() |
Tensor.xlogy_
|
xlogy() 的就地版本。 |
Tensor.xpu
|
返回此对象在 XPU 内存中的副本。 |
Tensor.zero_
|
将 self 张量填充为零。 |