Tensor.new_tensor
|
返回一个以 data 作为张量数据的新张量。 |
Tensor.new_full
|
返回一个大小为 size 且填充了 fill_value 的张量。 |
Tensor.new_empty
|
返回一个大小为 size 且填充了未初始化数据的张量。 |
Tensor.new_ones
|
返回一个大小为 size 且填充了 1 的张量。 |
Tensor.new_zeros
|
返回一个大小为 size 且填充了 0 的张量。 |
Tensor.is_cuda
|
如果张量存储在 GPU 上,则为 True ,否则为 False 。 |
Tensor.is_quantized
|
如果张量已量化,则为 True ,否则为 False 。 |
Tensor.is_meta
|
如果张量是 meta 张量,则为 True ,否则为 False 。 |
Tensor.device
|
是此张量所在的 torch.device 。 |
Tensor.grad
|
默认情况下,此属性为 None ,并且在首次调用 backward() 计算 self 的梯度时变为张量。 |
Tensor.ndim
|
dim() 的别名
|
Tensor.real
|
对于复值输入张量,返回一个包含 self 张量的实数值的新张量。 |
Tensor.imag
|
返回一个包含 self 张量的虚数值的新张量。 |
Tensor.nbytes
|
如果张量不使用稀疏存储布局,则返回张量的元素“视图”所消耗的字节数。 |
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 |
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_
|
用从 Bernoulli(p) 的独立样本填充 self 的每个位置。 |
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 |
Tensor.arccosh_
|
acosh_() -> Tensor |
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.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
|
返回唯一确定的整数元组,描述自身的维度顺序或物理布局。 |
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
|
返回自身张量的新视图,其中单例维度扩展为更大的尺寸。 |
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 倍的 source 的元素累加到 self 张量中,方法是按照 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_
|
使用 indices (张量的元组)中指定的索引,将张量 values 中的值放入张量 self 中。 |
Tensor.index_put
|
index_put_() 的异地版本。
|
Tensor.index_reduce_
|
通过使用 reduce 参数给出的归约,累加 source 的元素到 self 张量中,方法是累加到 index 中给出的顺序的索引中。 |
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.is_pinned
|
如果此张量驻留在 pinned 内存中,则返回 true。 |
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 |
Tensor.less_
|
less() 的原地版本。
|
Tensor.lu
|
请参阅 torch.lu() |
Tensor.lu_solve
|
请参阅 torch.lu_solve() |
Tensor.as_subclass
|
创建一个与 self 具有相同数据指针的 cls 实例。 |
Tensor.map_
|
将 callable 应用于 self 张量和给定 tensor 中的每个元素,并将结果存储在 self 张量中。 |
Tensor.masked_scatter_
|
在 mask 为 True 的位置,将 source 中的元素复制到 self 张量中。 |
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
|
|
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 时如何转换 other 。 |
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 复制到固定内存,如果尚未固定。 |
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,返回底层量化器的比例。 |
Tensor.q_zero_point
|
给定通过线性(仿射)量化量化的 Tensor,返回底层量化器的零点。 |
Tensor.q_per_channel_scales
|
给定通过线性(仿射)逐通道量化量化的 Tensor,返回底层量化器的比例 Tensor。 |
Tensor.q_per_channel_zero_points
|
给定通过线性(仿射)逐通道量化量化的 Tensor,返回底层量化器的零点 tensor。 |
Tensor.q_per_channel_axis
|
给定通过线性(仿射)逐通道量化量化的 Tensor,返回应用逐通道量化的维度的索引。 |
Tensor.rad2deg
|
请参阅 torch.rad2deg() |
Tensor.random_
|
使用从 [from, to - 1] 上的离散均匀分布中采样的数字填充 self tensor。 |
Tensor.ravel
|
请参阅 torch.ravel() |
Tensor.reciprocal
|
请参阅 torch.reciprocal() |
Tensor.reciprocal_
|
reciprocal() 的原地版本
|
Tensor.record_stream
|
将 tensor 标记为已被该流使用。 |
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。 |
Tensor.repeat_interleave
|
请参阅 torch.repeat_interleave() 。 |
Tensor.requires_grad
|
如果需要为此 Tensor 计算梯度,则为 True ,否则为 False 。 |
Tensor.requires_grad_
|
更改 autograd 是否应记录对此 tensor 的操作:原地设置此 tensor 的 requires_grad 属性。 |
Tensor.reshape
|
返回一个 tensor,其数据和元素数量与 self 相同,但形状已指定。 |
Tensor.reshape_as
|
返回与 other 相同形状的此 tensor。 |
Tensor.resize_
|
将 self tensor 调整为指定大小。 |
Tensor.resize_as_
|
将 self tensor 调整为与指定的 tensor 相同的大小。 |
Tensor.retain_grad
|
使此 Tensor 能够在 backward() 期间填充其 grad 。 |
Tensor.retains_grad
|
如果此 Tensor 是非叶节点,并且其 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_
|
将 tensor src 中的所有值写入到 self 中,索引由 index tensor 指定。 |
Tensor.scatter_add_
|
将 tensor src 中的所有值添加到 self 中,索引由 index tensor 指定,方式类似于 scatter_() 。 |
Tensor.scatter_add
|
torch.Tensor.scatter_add_() 的非原地版本
|
Tensor.scatter_reduce_
|
使用通过 reduce 参数("sum" 、"prod" 、"mean" 、"amax" 、"amin" )定义的应用归约,将 src tensor 中的所有值归约到 self tensor 中 index tensor 指定的索引。 |
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 的大小。 |
Tensor.size
|
返回 self tensor 的大小。 |
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
|
返回一个新的 稀疏 tensor,其值来自步幅 tensor self ,并由稀疏 tensor mask 的索引过滤。 |
Tensor.sparse_dim
|
返回 稀疏 tensor 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 在底层存储中的偏移量。 |
Tensor.storage_type
|
返回底层存储的类型。 |
Tensor.stride
|
返回 self tensor 的步幅。 |
Tensor.sub
|
请参阅 torch.sub() 。 |
Tensor.sub_
|
sub() 的原地版本
|
Tensor.subtract
|
请参阅 torch.subtract() 。 |
Tensor.subtract_
|
subtract() 的原地版本。
|
Tensor.sum
|
请参阅 torch.sum() |
Tensor.sum_to_size
|
将 this tensor 求和到 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 dtype 和/或设备转换。 |
Tensor.to_mkldnn
|
在 torch.mkldnn 布局中返回 tensor 的副本。 |
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 作为(嵌套)列表返回。 |
Tensor.topk
|
请参阅 torch.topk() |
Tensor.to_dense
|
如果 self 不是步幅 tensor,则创建 self 的步幅副本,否则返回 self 。 |
Tensor.to_sparse
|
返回 tensor 的稀疏副本。 |
Tensor.to_sparse_csr
|
将 tensor 转换为压缩行存储格式 (CSR)。 |
Tensor.to_sparse_csc
|
将 tensor 转换为压缩列存储 (CSC) 格式。 |
Tensor.to_sparse_bsr
|
将 tensor 转换为给定块大小的块稀疏行 (BSR) 存储格式。 |
Tensor.to_sparse_bsc
|
将 tensor 转换为给定块大小的块稀疏列 (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 类型的此 tensor。 |
Tensor.unbind
|
请参阅 torch.unbind() |
Tensor.unflatten
|
请参阅 torch.unflatten() 。 |
Tensor.unfold
|
返回原始 tensor 的视图,该视图包含维度 dimension 中 self tensor 的大小为 size 的所有切片。 |
Tensor.uniform_
|
使用从连续均匀分布中采样的数字填充 self tensor |
Tensor.unique
|
返回输入 tensor 的唯一元素。 |
Tensor.unique_consecutive
|
从每个连续的等效元素组中消除除第一个元素以外的所有元素。 |
Tensor.unsqueeze
|
请参阅 torch.unsqueeze() |
Tensor.unsqueeze_
|
unsqueeze() 的原地版本
|
Tensor.values
|
返回 稀疏 COO tensor 的值 tensor。 |
Tensor.var
|
请参阅 torch.var() |
Tensor.vdot
|
请参阅 torch.vdot() |
Tensor.view
|
返回一个新 tensor,其数据与 self tensor 相同,但 shape 不同。 |
Tensor.view_as
|
将此 tensor 视为与 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 tensor。 |