Tensor.new_tensor
|
傳回一個新的 Tensor,其 data 作為 tensor 資料。 |
Tensor.new_full
|
傳回一個大小為 size 且填滿 fill_value 的 Tensor。 |
Tensor.new_empty
|
傳回一個大小為 size 且填滿未初始化資料的 Tensor。 |
Tensor.new_ones
|
傳回一個大小為 size 且填滿 1 的 Tensor。 |
Tensor.new_zeros
|
傳回一個大小為 size 且填滿 0 的 Tensor。 |
Tensor.is_cuda
|
如果 Tensor 儲存在 GPU 上,則為 True ,否則為 False 。 |
Tensor.is_quantized
|
如果 Tensor 已量化,則為 True ,否則為 False 。 |
Tensor.is_meta
|
如果 Tensor 是一個 meta tensor,則為 True ,否則為 False 。 |
Tensor.device
|
這是 torch.device ,表示此 Tensor 所在的裝置。 |
Tensor.grad
|
預設情況下,此屬性為 None ,並且在第一次呼叫 backward() 計算 self 的梯度時,會變成一個 Tensor。 |
Tensor.ndim
|
dim() 的別名
|
Tensor.real
|
傳回一個新的 tensor,其中包含複數值輸入 tensor self 的實數值。 |
Tensor.imag
|
傳回一個新的 tensor,其中包含 self tensor 的虛數值。 |
Tensor.nbytes
|
如果 Tensor 不使用稀疏儲存佈局,則傳回 Tensor 元素 "view" 所消耗的位元組數。 |
Tensor.itemsize
|
element_size() 的別名
|
Tensor.abs
|
請參閱 torch.abs() |
Tensor.abs_
|
abs() 的原地 (in-place) 版本
|
Tensor.absolute
|
請參閱 abs() |
Tensor.absolute_
|
absolute() 的原地 (in-place) 版本。 abs_() 的別名
|
Tensor.acos
|
請參閱 torch.acos() |
Tensor.acos_
|
acos() 的原地 (in-place) 版本
|
Tensor.arccos
|
請參閱 torch.arccos() |
Tensor.arccos_
|
arccos() 的原地 (in-place) 版本
|
Tensor.add
|
將純量或 tensor 加到 self tensor。 |
Tensor.add_
|
add() 的原地 (in-place) 版本
|
Tensor.addbmm
|
請參閱 torch.addbmm() |
Tensor.addbmm_
|
addbmm() 的原地 (in-place) 版本
|
Tensor.addcdiv
|
請參閱 torch.addcdiv() |
Tensor.addcdiv_
|
addcdiv() 的原地 (In-place) 版本
|
Tensor.addcmul
|
請參閱 torch.addcmul() |
Tensor.addcmul_
|
addcmul() 的原地 (In-place) 版本
|
Tensor.addmm
|
請參閱 torch.addmm() |
Tensor.addmm_
|
addmm() 的原地 (In-place) 版本
|
Tensor.sspaddmm
|
請參閱 torch.sspaddmm() |
Tensor.addmv
|
請參閱 torch.addmv() |
Tensor.addmv_
|
addmv() 的原地 (In-place) 版本
|
Tensor.addr
|
請參閱 torch.addr() |
Tensor.addr_
|
addr() 的原地 (In-place) 版本
|
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 應用於 tensor 中的每個元素,並將每個元素替換為 callable 返回的值。 |
Tensor.argmax
|
請參閱 torch.argmax() |
Tensor.argmin
|
請參閱 torch.argmin() |
Tensor.argsort
|
請參閱 torch.argsort() |
Tensor.argwhere
|
請參閱 torch.argwhere() |
Tensor.asin
|
請參閱 torch.asin() |
Tensor.asin_
|
asin() 的原地 (In-place) 版本
|
Tensor.arcsin
|
請參閱 torch.arcsin() |
Tensor.arcsin_
|
arcsin() 的原地 (In-place) 版本
|
Tensor.as_strided
|
請參閱 torch.as_strided() |
Tensor.atan
|
請參閱 torch.atan() |
Tensor.atan_
|
atan() 的原地 (In-place) 版本
|
Tensor.arctan
|
請參閱 torch.arctan() |
Tensor.arctan_
|
arctan() 的原地 (In-place) 版本
|
Tensor.atan2
|
請參閱 torch.atan2() |
Tensor.atan2_
|
atan2() 的原地 (In-place) 版本
|
Tensor.arctan2
|
請參閱 torch.arctan2() |
Tensor.arctan2_
|
atan2_(other) -> Tensor |
Tensor.all
|
請參閱 torch.all() |
Tensor.any
|
請參閱 torch.any() |
Tensor.backward
|
計算當前 tensor 相對於圖的葉節點的梯度。 |
Tensor.baddbmm
|
請參閱 torch.baddbmm() |
Tensor.baddbmm_
|
baddbmm() 的原地 (In-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.bitwise_and
|
請參閱 torch.bitwise_and() |
Tensor.bitwise_and_
|
bitwise_and() 的原地 (in-place) 版本
|
Tensor.bitwise_or
|
請參閱 torch.bitwise_or() |
Tensor.bitwise_or_
|
bitwise_or() 的原地 (in-place) 版本
|
Tensor.bitwise_xor
|
請參閱 torch.bitwise_xor() |
Tensor.bitwise_xor_
|
bitwise_xor() 的原地 (in-place) 版本
|
Tensor.bitwise_left_shift
|
請參閱 torch.bitwise_left_shift() |
Tensor.bitwise_left_shift_
|
bitwise_left_shift() 的原地 (in-place) 版本
|
Tensor.bitwise_right_shift
|
請參閱 torch.bitwise_right_shift() |
Tensor.bitwise_right_shift_
|
bitwise_right_shift() 的原地 (in-place) 版本
|
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_
|
用從柯西分布 (Cauchy distribution) 抽取的數字填充張量 |
Tensor.ceil
|
請參閱 torch.ceil() |
Tensor.ceil_
|
ceil() 的原地 (in-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.clip
|
是 clamp() 的別名。 |
Tensor.clip_
|
是 clamp_() 的別名。 |
Tensor.clone
|
請參閱 torch.clone() |
Tensor.contiguous
|
返回一個在記憶體中連續的 Tensor,其中包含與 self Tensor 相同的資料。 |
Tensor.copy_
|
將元素從 src 複製到 self Tensor,並返回 self 。 |
Tensor.conj
|
請參閱 torch.conj() |
Tensor.conj_physical
|
請參閱 torch.conj_physical() |
Tensor.conj_physical_
|
conj_physical() 的原地 (in-place) 版本
|
Tensor.resolve_conj
|
請參閱 torch.resolve_conj() |
Tensor.resolve_neg
|
請參閱 torch.resolve_neg() |
Tensor.copysign
|
請參閱 torch.copysign() |
Tensor.copysign_
|
copysign() 的原地 (in-place) 版本
|
Tensor.cos
|
請參閱 torch.cos() |
Tensor.cos_
|
cos() 的原地 (in-place) 版本
|
Tensor.cosh
|
請參閱 torch.cosh() |
Tensor.cosh_
|
cosh() 的原地 (in-place) 版本
|
Tensor.corrcoef
|
請參閱 torch.corrcoef() |
Tensor.count_nonzero
|
請參閱 torch.count_nonzero() |
Tensor.cov
|
請參閱 torch.cov() |
Tensor.acosh
|
請參閱 torch.acosh() |
Tensor.acosh_
|
acosh() 的原地 (in-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.cumsum
|
請參閱 torch.cumsum() |
Tensor.cumsum_
|
cumsum() 的原地 (in-place) 版本
|
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 的第一個元素的位址。 |
Tensor.deg2rad
|
請參閱 torch.deg2rad() |
Tensor.dequantize
|
給定一個量化的 Tensor,將其反量化並返回反量化的 float Tensor。 |
Tensor.det
|
請參閱 torch.det() |
Tensor.dense_dim
|
返回 稀疏 Tensor self 中的稠密維度數量。 |
Tensor.detach
|
返回一個新的 Tensor,從當前圖中分離。 |
Tensor.detach_
|
將 Tensor 從建立它的圖中分離,使其成為葉節點。 |
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() 的原地 (in-place) 版本
|
Tensor.dim
|
傳回 self 張量的維度數量。 |
Tensor.dim_order
|
傳回唯一確定的整數元組,描述 self 的維度順序或物理佈局。 |
Tensor.dist
|
請參閱 torch.dist() |
Tensor.div
|
請參閱 torch.div() |
Tensor.div_
|
div() 的原地 (in-place) 版本
|
Tensor.divide
|
請參閱 torch.divide() |
Tensor.divide_
|
divide() 的原地 (in-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.equal
|
請參閱 torch.equal() |
Tensor.erf
|
請參閱 torch.erf() |
Tensor.erf_
|
erf() 的原地 (in-place) 版本
|
Tensor.erfc
|
請參閱 torch.erfc() |
Tensor.erfc_
|
erfc() 的原地 (in-place) 版本
|
Tensor.erfinv
|
請參閱 torch.erfinv() |
Tensor.erfinv_
|
erfinv() 的原地 (in-place) 版本
|
Tensor.exp
|
請參閱 torch.exp() |
Tensor.exp_
|
exp() 的原地 (in-place) 版本
|
Tensor.expm1
|
請參閱 torch.expm1() |
Tensor.expm1_
|
expm1() 的原地 (in-place) 版本
|
Tensor.expand
|
傳回 self 張量的新視圖,其中單例維度擴展到更大的尺寸。 |
Tensor.expand_as
|
將此張量擴展到與 other 相同的大小。 |
Tensor.exponential_
|
使用從 PDF(機率密度函數)中提取的元素填充 self 張量 |
Tensor.fix
|
請參閱 torch.fix() 。 |
Tensor.fix_
|
fix() 的原地 (in-place) 版本
|
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() 的原地 (In-place) 版本
|
Tensor.floor
|
請參閱 torch.floor() |
Tensor.floor_
|
floor() 的原地 (In-place) 版本
|
Tensor.floor_divide
|
請參閱 torch.floor_divide() |
Tensor.floor_divide_
|
floor_divide() 的原地 (In-place) 版本
|
Tensor.fmod
|
請參閱 torch.fmod() |
Tensor.fmod_
|
fmod() 的原地 (In-place) 版本
|
Tensor.frac
|
請參閱 torch.frac() |
Tensor.frac_
|
frac() 的原地 (In-place) 版本
|
Tensor.frexp
|
請參閱 torch.frexp() |
Tensor.gather
|
請參閱 torch.gather() |
Tensor.gcd
|
請參閱 torch.gcd() |
Tensor.gcd_
|
gcd() 的原地 (In-place) 版本
|
Tensor.ge
|
請參閱 torch.ge() 。 |
Tensor.ge_
|
ge() 的原地 (In-place) 版本。
|
Tensor.greater_equal
|
請參閱 torch.greater_equal() 。 |
Tensor.greater_equal_
|
greater_equal() 的原地 (In-place) 版本。
|
Tensor.geometric_
|
使用從幾何分布中抽取的元素填充 self 張量 |
Tensor.geqrf
|
請參閱 torch.geqrf() |
Tensor.ger
|
請參閱 torch.ger() |
Tensor.get_device
|
對於 CUDA 張量,此函數會傳回張量所在的 GPU 的設備序數。 |
Tensor.gt
|
請參閱 torch.gt() 。 |
Tensor.gt_
|
gt() 的原地 (In-place) 版本。
|
Tensor.greater
|
請參閱 torch.greater() 。 |
Tensor.greater_
|
greater() 的原地 (In-place) 版本。
|
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() 的原地 (In-place) 版本
|
Tensor.i0
|
請參閱 torch.i0() |
Tensor.i0_
|
i0() 的原地 (In-place) 版本
|
Tensor.igamma
|
請參閱 torch.igamma() |
Tensor.igamma_
|
igamma() 的原地 (In-place) 版本
|
Tensor.igammac
|
請參閱 torch.igammac() |
Tensor.igammac_
|
igammac() 的原地 (in-place) 版本
|
Tensor.index_add_
|
將 alpha 乘以 source 的元素,按照 index 中給定的順序,累加到 self tensor 中。 |
Tensor.index_add
|
torch.Tensor.index_add_() 的異地 (out-of-place) 版本。
|
Tensor.index_copy_
|
將 tensor 的元素,按照 index 中給定的順序選擇索引,複製到 self tensor 中。 |
Tensor.index_copy
|
torch.Tensor.index_copy_() 的異地 (out-of-place) 版本。
|
Tensor.index_fill_
|
將 self tensor 的元素,按照 index 中給定的順序選擇索引,用值 value 填充。 |
Tensor.index_fill
|
torch.Tensor.index_fill_() 的異地 (out-of-place) 版本。
|
Tensor.index_put_
|
使用 indices (一個 Tensors 的元組) 中指定的索引,將 tensor values 中的值放入 tensor self 中。 |
Tensor.index_put
|
index_put_() 的異地 (out-place) 版本。
|
Tensor.index_reduce_
|
將 source 的元素,按照 index 中給定的順序累加到 self tensor 中,使用 reduce 參數給定的歸約方式。 |
Tensor.index_reduce
|
|
Tensor.index_select
|
請參閱 torch.index_select() |
Tensor.indices
|
返回 稀疏 COO tensor 的索引 tensor。 |
Tensor.inner
|
請參閱 torch.inner() 。 |
Tensor.int
|
self.int() 等效於 self.to(torch.int32) 。
|
Tensor.int_repr
|
給定一個量化的 Tensor,self.int_repr() 返回一個以 uint8_t 作為資料類型的 CPU Tensor,它儲存給定 Tensor 的底層 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 tensor 以記憶體格式指定的順序在記憶體中是連續的,則返回 True。 |
Tensor.is_complex
|
如果 self 的資料類型是複數資料類型,則返回 True。 |
Tensor.is_conj
|
如果 self 的共軛位元 (conjugate bit) 設為 true,則返回 True。 |
Tensor.is_floating_point
|
如果 self 的資料類型是浮點資料類型,則返回 True。 |
Tensor.is_inference
|
請參閱 torch.is_inference() |
Tensor.is_leaf
|
依照慣例,所有 requires_grad 為 False 的 Tensors 都是 leaf Tensors。 |
Tensor.is_pinned
|
如果此 tensor 位於鎖頁記憶體 (pinned memory) 中,則返回 true。 |
Tensor.is_set_to
|
如果兩個 tensor 都指向完全相同的記憶體(相同的儲存體、偏移量、大小和步幅),則返回 True。 |
Tensor.is_shared
|
檢查 tensor 是否位於共享記憶體中。 |
Tensor.is_signed
|
如果 self 的資料類型是有符號資料類型,則返回 True。 |
Tensor.is_sparse
|
如果 Tensor 使用稀疏 COO 儲存佈局,則為 True ,否則為 False 。 |
Tensor.istft
|
請參閱 torch.istft() |
Tensor.isreal
|
請參閱 torch.isreal() |
Tensor.item
|
將此 tensor 的值作為標準 Python 數字返回。 |
Tensor.kthvalue
|
請參閱 torch.kthvalue() |
Tensor.lcm
|
請參閱 torch.lcm() |
Tensor.lcm_
|
lcm() 的原地 (in-place) 版本
|
Tensor.ldexp
|
請參閱 torch.ldexp() |
Tensor.ldexp_
|
原地 (In-place) 版本的 ldexp() |
Tensor.le
|
請參閱 torch.le() 。 |
Tensor.le_
|
原地 (In-place) 版本的 le() 。 |
Tensor.less_equal
|
請參閱 torch.less_equal() 。 |
Tensor.less_equal_
|
原地 (In-place) 版本的 less_equal() 。 |
Tensor.lerp
|
請參閱 torch.lerp() |
Tensor.lerp_
|
原地 (In-place) 版本的 lerp() |
Tensor.lgamma
|
請參閱 torch.lgamma() |
Tensor.lgamma_
|
原地 (In-place) 版本的 lgamma() |
Tensor.log
|
請參閱 torch.log() |
Tensor.log_
|
原地 (In-place) 版本的 log() |
Tensor.logdet
|
請參閱 torch.logdet() |
Tensor.log10
|
請參閱 torch.log10() |
Tensor.log10_
|
原地 (In-place) 版本的 log10() |
Tensor.log1p
|
請參閱 torch.log1p() |
Tensor.log1p_
|
原地 (In-place) 版本的 log1p() |
Tensor.log2
|
請參閱 torch.log2() |
Tensor.log2_
|
原地 (In-place) 版本的 log2() |
Tensor.log_normal_
|
使用給定的平均數 μ 和標準差 σ 將 self tensor 填入來自對數常態分佈的數字樣本。 |
Tensor.logaddexp
|
請參閱 torch.logaddexp() |
Tensor.logaddexp2
|
請參閱 torch.logaddexp2() |
Tensor.logsumexp
|
請參閱 torch.logsumexp() |
Tensor.logical_and
|
請參閱 torch.logical_and() |
Tensor.logical_and_
|
原地 (In-place) 版本的 logical_and() |
Tensor.logical_not
|
請參閱 torch.logical_not() |
Tensor.logical_not_
|
原地 (In-place) 版本的 logical_not() |
Tensor.logical_or
|
請參閱 torch.logical_or() |
Tensor.logical_or_
|
原地 (In-place) 版本的 logical_or() |
Tensor.logical_xor
|
請參閱 torch.logical_xor() |
Tensor.logical_xor_
|
原地 (In-place) 版本的 logical_xor() |
Tensor.logit
|
請參閱 torch.logit() |
Tensor.logit_
|
原地 (In-place) 版本的 logit() |
Tensor.long
|
self.long() 等同於 self.to(torch.int64) 。
|
Tensor.lt
|
請參閱 torch.lt() 。 |
Tensor.lt_
|
原地 (In-place) 版本的 lt() 。 |
Tensor.less
|
lt(other) -> Tensor |
Tensor.less_
|
原地 (In-place) 版本的 less() 。 |
Tensor.lu
|
請參閱 torch.lu() |
Tensor.lu_solve
|
請參閱 torch.lu_solve() |
Tensor.as_subclass
|
建立一個與 self 具有相同資料指標的 cls 實例。 |
Tensor.map_
|
對 self tensor 中的每個元素以及給定的 tensor 應用 callable ,並將結果儲存在 self tensor 中。 |
Tensor.masked_scatter_
|
將 source 中的元素複製到 self tensor 中,位置為 mask 為 True 的地方。 |
Tensor.masked_scatter
|
torch.Tensor.masked_scatter_() 的非原地 (out-of-place) 版本
|
Tensor.masked_fill_
|
用 value 填充 self tensor 的元素,其中 mask 為 True。 |
Tensor.masked_fill
|
torch.Tensor.masked_fill_() 的非原地 (out-of-place) 版本
|
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() 的原地 (in-place) 版本。
|
Tensor.multiply
|
請參閱 torch.multiply() 。 |
Tensor.multiply_
|
multiply() 的原地 (in-place) 版本。
|
Tensor.multinomial
|
請參閱 torch.multinomial() |
Tensor.mv
|
請參閱 torch.mv() |
Tensor.mvlgamma
|
請參閱 torch.mvlgamma() |
Tensor.mvlgamma_
|
mvlgamma() 的原地 (in-place) 版本
|
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() 的原地 (in-place) 版本。
|
Tensor.ne
|
請參閱 torch.ne() 。 |
Tensor.ne_
|
ne() 的原地 (in-place) 版本。
|
Tensor.not_equal
|
請參閱 torch.not_equal() 。 |
Tensor.not_equal_
|
not_equal() 的原地 (in-place) 版本。
|
Tensor.neg
|
請參閱 torch.neg() |
Tensor.neg_
|
neg() 的原地 (in-place) 版本。
|
Tensor.negative
|
請參閱 torch.negative() |
Tensor.negative_
|
negative() 的原地 (in-place) 版本。
|
Tensor.nelement
|
numel() 的別名。
|
Tensor.nextafter
|
請參閱 torch.nextafter() |
Tensor.nextafter_
|
nextafter() 的原地 (in-place) 版本。
|
Tensor.nonzero
|
請參閱 torch.nonzero() |
Tensor.norm
|
請參閱 torch.norm() |
Tensor.normal_
|
使用由 mean 和 std 參數化的常態分布樣本填充 self 張量中的元素。 |
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() 的原地 (in-place) 版本。
|
Tensor.positive
|
請參閱 torch.positive() |
Tensor.pow
|
請參閱 torch.pow() |
Tensor.pow_
|
pow() 的原地 (in-place) 版本。
|
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,回傳底層量化器的 scale。 |
Tensor.q_zero_point
|
給定一個經由線性(仿射)量化所量化的 Tensor,回傳底層量化器的 zero_point。 |
Tensor.q_per_channel_scales
|
給定一個經由線性(仿射)逐通道量化所量化的 Tensor,回傳一個 Tensor,其包含底層量化器的 scales。 |
Tensor.q_per_channel_zero_points
|
給定一個經由線性(仿射)逐通道量化所量化的 Tensor,回傳一個 Tensor,其包含底層量化器的 zero_points。 |
Tensor.q_per_channel_axis
|
給定一個經由線性(仿射)逐通道量化所量化的 Tensor,回傳套用逐通道量化的維度索引。 |
Tensor.rad2deg
|
請參閱 torch.rad2deg() |
Tensor.random_
|
用從 [from, to - 1] 範圍內的離散均勻分佈中抽樣的數字填滿 self 張量。 |
Tensor.ravel
|
請參閱 torch.ravel() |
Tensor.reciprocal
|
請參閱 torch.reciprocal() |
Tensor.reciprocal_
|
reciprocal() 的原地 (in-place) 版本
|
Tensor.record_stream
|
將張量標記為已被此串流使用。 |
Tensor.register_hook
|
註冊一個向後鉤子 (backward hook)。 |
Tensor.register_post_accumulate_grad_hook
|
註冊一個在梯度累積後運行的向後鉤子。 |
Tensor.remainder
|
請參閱 torch.remainder() |
Tensor.remainder_
|
remainder() 的原地 (in-place) 版本
|
Tensor.renorm
|
請參閱 torch.renorm() |
Tensor.renorm_
|
renorm() 的原地 (in-place) 版本
|
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
|
啟用此張量以使其 grad 在 backward() 期間被填充。 |
Tensor.retains_grad
|
如果此張量是非葉節點,並且啟用了其 grad 以在 backward() 期間被填充,則為 True ,否則為 False 。 |
Tensor.roll
|
請參閱 torch.roll() |
Tensor.rot90
|
請參閱 torch.rot90() |
Tensor.round
|
請參閱 torch.round() |
Tensor.round_
|
round() 的原地 (in-place) 版本
|
Tensor.rsqrt
|
請參閱 torch.rsqrt() |
Tensor.rsqrt_
|
rsqrt() 的原地 (in-place) 版本
|
Tensor.scatter
|
torch.Tensor.scatter_() 的異地 (out-of-place) 版本
|
Tensor.scatter_
|
將張量 src 中的所有值,根據 index 張量中指定的索引,寫入 self 中。 |
Tensor.scatter_add_
|
以類似於 scatter_() 的方式,將張量 src 中的所有值,根據 index 張量中指定的索引,加到 self 中。 |
Tensor.scatter_add
|
torch.Tensor.scatter_add_() 的異地 (out-of-place) 版本
|
Tensor.scatter_reduce_
|
使用透過 reduce 參數定義的縮減方式("sum" 、"prod" 、"mean" 、"amax" 、"amin" ),將 src 張量中的所有值縮減到 index 張量中指定的 self 張量索引。 |
Tensor.scatter_reduce
|
torch.Tensor.scatter_reduce_() 的非原地 (out-of-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.sign
|
請參閱 torch.sign() |
Tensor.sign_
|
sign() 的原地 (in-place) 版本
|
Tensor.signbit
|
請參閱 torch.signbit() |
Tensor.sgn
|
請參閱 torch.sgn() |
Tensor.sgn_
|
sgn() 的原地 (in-place) 版本
|
Tensor.sin
|
請參閱 torch.sin() |
Tensor.sin_
|
sin() 的原地 (in-place) 版本
|
Tensor.sinc
|
請參閱 torch.sinc() |
Tensor.sinc_
|
sinc() 的原地 (in-place) 版本
|
Tensor.sinh
|
請參閱 torch.sinh() |
Tensor.sinh_
|
sinh() 的原地 (in-place) 版本
|
Tensor.asinh
|
請參閱 torch.asinh() |
Tensor.asinh_
|
asinh() 的原地 (in-place) 版本
|
Tensor.arcsinh
|
請參閱 torch.arcsinh() |
Tensor.arcsinh_
|
arcsinh() 的原地 (in-place) 版本
|
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() 的原地 (in-place) 版本
|
Tensor.square
|
請參閱 torch.square() |
Tensor.square_
|
square() 的原地 (in-place) 版本
|
Tensor.squeeze
|
請參閱 torch.squeeze() |
Tensor.squeeze_
|
squeeze() 的原地 (in-place) 版本
|
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 張量的步幅 (stride)。 |
Tensor.sub
|
請參閱 torch.sub() 。 |
Tensor.sub_
|
sub() 的原地 (in-place) 版本
|
Tensor.subtract
|
請參閱 torch.subtract() 。 |
Tensor.subtract_
|
subtract() 的原地 (in-place) 版本。
|
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() 的原地 (in-place) 版本
|
Tensor.tensor_split
|
請參閱 torch.tensor_split() |
Tensor.tile
|
請參閱 torch.tile() |
Tensor.to
|
執行 Tensor dtype 和/或裝置轉換。 |
Tensor.to_mkldnn
|
返回 torch.mkldnn 佈局中張量的副本。 |
Tensor.take
|
請參閱 torch.take() |
Tensor.take_along_dim
|
請參閱 torch.take_along_dim() |
Tensor.tan
|
請參閱 torch.tan() |
Tensor.tan_
|
tan() 的原地 (in-place) 版本
|
Tensor.tanh
|
請參閱 torch.tanh() |
Tensor.tanh_
|
tanh() 的原地 (in-place) 版本
|
Tensor.atanh
|
請參閱 torch.atanh() |
Tensor.atanh_
|
atanh() 的原地 (in-place) 版本
|
Tensor.arctanh
|
請參閱 torch.arctanh() |
Tensor.arctanh_
|
arctanh() 的原地 (in-place) 版本
|
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() 的原地 (In-place) 版本
|
Tensor.triangular_solve
|
請參閱 torch.triangular_solve() |
Tensor.tril
|
請參閱 torch.tril() |
Tensor.tril_
|
tril() 的原地 (In-place) 版本
|
Tensor.triu
|
請參閱 torch.triu() |
Tensor.triu_
|
triu() 的原地 (In-place) 版本
|
Tensor.true_divide
|
請參閱 torch.true_divide() |
Tensor.true_divide_
|
true_divide_() 的原地 (In-place) 版本
|
Tensor.trunc
|
請參閱 torch.trunc() |
Tensor.trunc_
|
trunc() 的原地 (In-place) 版本
|
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() 的原地 (In-place) 版本
|
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() 的原地 (In-place) 版本
|
Tensor.xpu
|
傳回此物件在 XPU 記憶體中的副本。 |
Tensor.zero_
|
用零填充 self 張量。 |