Rate this Page

Class Tensor#

Inheritance Relationships#

Base Type#

  • publicTensorBase

Class Documentation#

classTensor:publicTensorBase#

Public Types

template<typenameT>
usinghook_return_void_t=std::enable_if_t<std::is_void<typenamestd::invoke_result_t<T&,Tensor>>::value,unsigned>#
template<typenameT>
usinghook_return_var_t=std::enable_if_t<std::is_same_v<typenamestd::invoke_result_t<T&,Tensor>,Tensor>,unsigned>#

Public Functions

Tensor()=default#
inlineexplicitTensor(c10::intrusive_ptr<TensorImpl,UndefinedTensorImpl>tensor_impl)#
Tensor(constTensor&tensor)=default#
Tensor(Tensor&&tensor)=default#
inlineexplicitTensor(constTensorBase&base)#
inlineTensor(TensorBase&&base)#
inlineTensorcontiguous(MemoryFormatmemory_format=MemoryFormat::Contiguous)const#
inlineTensorconj()const#
inlinec10::MaybeOwned<Tensor>expect_contiguous(MemoryFormatmemory_format=MemoryFormat::Contiguous)const&#

Should be used if *this can reasonably be expected to be contiguous and performance is important.

Compared to contiguous, it saves a reference count increment/decrement if *this is already contiguous, at the cost in all cases of an extra pointer of stack usage, an extra branch to access, and an extra branch at destruction time.

c10::MaybeOwned<Tensor>expect_contiguous(MemoryFormatmemory_format=MemoryFormat::Contiguous)&&=delete#
inlineTensor&operator=(constTensorBase&x)&noexcept#
inlineTensor&operator=(TensorBase&&x)&noexcept#
inlineTensor&operator=(constTensor&x)&noexcept#
inlineTensor&operator=(Tensor&&x)&noexcept#
inlineTensor&operator=(constScalar&v)&&#
inlineTensor&operator=(constTensor&rhs)&&#
inlineTensor&operator=(Tensor&&rhs)&&#
inline C10_DEPRECATED_MESSAGE("Tensor.type()isdeprecated.InsteaduseTensor.options(),whichinmanycases(e.g.inaconstructor)isadrop-inreplacement.Ifyouwereusingdatafromtype(),thatisnowavailablefromTensoritself,soinsteadoftensor.type().scalar_type(),usetensor.scalar_type()insteadandinsteadoftensor.type().backend()usetensor.device().")DeprecatedTypeProperties&type()const
inlineTensortoType(ScalarTypet)const#
inlineTensortoBackend(Backendb)const#
inline C10_DEPRECATED_MESSAGE("Tensor.is_variable()isdeprecated;everythingisavariablenow.(Ifyouwanttoassertthatvariablehasbeenappropriatelyhandledalready,useat::impl::variable_excluded_from_dispatch())")boolis_variable()constnoexcept
template<typenameT>inline C10_DEPRECATED_MESSAGE("Tensor.data<T>()isdeprecated.PleaseuseTensor.data_ptr<T>()instead.")T*data()const
template<typenameT>
Titem()const#
template<typenameT,size_tN,template<typenameU>classPtrTraits=DefaultPtrTraits,typenameindex_t=int64_t> C10_DEPRECATED_MESSAGE("packed_accessorisdeprecated,usepacked_accessor32orpacked_accessor64instead")GenericPackedTensorAccessor<T
inlineindex_tpacked_accessor()const&#
template<typenameT,size_tN,template<typenameU>classPtrTraits=DefaultPtrTraits,typenameindex_t=int64_t> C10_DEPRECATED_MESSAGE("packed_accessorisdeprecated,usepacked_accessor32orpacked_accessor64instead")GenericPackedTensorAccessor<T
index_tpacked_accessor()&&=delete#
inlineTensoroperator~()const#
inlineTensoroperator-()const#
inlineTensor&operator+=(constTensor&other)#
inlineTensor&operator+=(constScalar&other)#
inlineTensor&operator-=(constTensor&other)#
inlineTensor&operator-=(constScalar&other)#
inlineTensor&operator*=(constTensor&other)#
inlineTensor&operator*=(constScalar&other)#
inlineTensor&operator/=(constTensor&other)#
inlineTensor&operator/=(constScalar&other)#
inlineTensor&operator&=(constTensor&other)#
inlineTensor&operator|=(constTensor&other)#
inlineTensor&operator^=(constTensor&other)#
inlineTensoroperator[](constScalar&index)const#
inlineTensoroperator[](constTensor&index)const#
inlineTensoroperator[](int64_tindex)const#
Tensorindex(ArrayRef<at::indexing::TensorIndex>indices)const#
Tensorindex(std::initializer_list<at::indexing::TensorIndex>indices)const#
Tensor&index_put_(ArrayRef<at::indexing::TensorIndex>indices,Tensorconst&rhs)#
Tensor&index_put_(ArrayRef<at::indexing::TensorIndex>indices,constScalar&v)#
Tensor&index_put_(std::initializer_list<at::indexing::TensorIndex>indices,Tensorconst&rhs)#
Tensor&index_put_(std::initializer_list<at::indexing::TensorIndex>indices,constScalar&v)#
inlineTensorcpu()const#
inlineTensorcuda()const#
inlineTensorhip()const#
inlineTensorve()const#
inlineTensorvulkan()const#
inlineTensormetal()const#
inlineTensormeta()const#
inlinevoidbackward(constTensor&gradient={},std::optional<bool>retain_graph=std::nullopt,boolcreate_graph=false,std::optional<TensorList>inputs=std::nullopt)const#

Computes the gradient of current tensor with respect to graph leaves.

The graph is differentiated using the chain rule. If the tensor is non-scalar (i.e. its data has more than one element) and requires gradient, the function additionally requires specifyinggradient. It should be a tensor of matching type and location, that contains the gradient of the differentiated function w.r.t. thisTensor.

This function accumulates gradients in the leaves - you might need to zero them before calling it.

Parameters:
  • gradient – Gradient w.r.t. the tensor. If it is a tensor, it will be automatically converted to aTensor that does not require grad unlesscreate_graph is True. None values can be specified for scalar Tensors or ones that don’t require grad. If a None value would be acceptable then this argument is optional.

  • retain_graph – Iffalse, the graph used to compute the grads will be freed. Note that in nearly all cases setting this option to True is not needed and often can be worked around in a much more efficient way. Defaults to the value ofcreate_graph.

  • create_graph – Iftrue, graph of the derivative will be constructed, allowing to compute higher order derivative products. Defaults tofalse.

  • inputs – Inputs w.r.t. which the gradient will be accumulated intoat::Tensor::grad. All other Tensors will be ignored. If not provided, the gradient is accumulated into all the leaf Tensors that were used to compute the current tensor. When inputs are provided and a given input is not a leaf, the current implementation will call its grad_fn (even though it is not strictly needed to get this gradients). It is an implementation detail on which the user should not rely. Seepytorch/pytorch#60521 for more details.

inlineconstTensor&set_requires_grad(boolrequires_grad)const#
inlineTensor&mutable_grad()const#

Return a mutable reference to the gradient.

This is conventionally used ast.grad()=x to set a gradient to a completely new tensor. Note that this function work with a non-constTensor and is not thread safe.

inlineconstTensor&grad()const#

This function returns an undefined tensor by default and returns a defined tensor the first time a call tobackward() computes gradients for thisTensor.

The attribute will then contain the gradients computed and future calls tobackward() will accumulate (add) gradients into it.

inlineconstTensor&_fw_grad(uint64_tlevel)const#

This function returns the forward gradient for thisTensor at the given level.

inlinevoid_set_fw_grad(constTensorBase&new_grad,uint64_tlevel,boolis_inplace_op)const#

This function can be used to set the value of the forward grad.

Note that the given new_grad might not be used directly if it has different metadata (size/stride/storage offset) compared to thisTensor. In that case, new_grad content will be copied into a newTensor

inlinevoid__dispatch__backward(at::TensorListinputs,const::std::optional<at::Tensor>&gradient={},::std::optional<bool>retain_graph=::std::nullopt,boolcreate_graph=false)const#
inlinevoid__dispatch_set_data(constat::Tensor&new_data)const#
inlineat::Tensor__dispatch_data()const#
inlinebool__dispatch_is_leaf()const#
inlineint64_t__dispatch_output_nr()const#
inlineint64_t__dispatch__version()const#
inlineat::Tensor&__dispatch_requires_grad_(boolrequires_grad=true)const#
inlinevoid__dispatch_retain_grad()const#
inlinebool__dispatch_retains_grad()const#
inlineat::Tensor_fw_primal(int64_tlevel)const#
inlineat::Tensor&rename_(::std::optional<at::DimnameList>names)const#
inlineat::Tensorrename(::std::optional<at::DimnameList>names)const#
inlineat::Tensoralign_to(at::DimnameListnames)const#
inlineat::Tensoralign_to(at::DimnameListorder,int64_tellipsis_idx)const#
inlineat::Tensoralign_as(constat::Tensor&other)const#
inlineat::Tensorrefine_names(at::DimnameListnames)const#
inlineat::Tensorabs()const#
inlineat::Tensor&abs_()const#
inlineat::Tensorabsolute()const#
inlineat::Tensor&absolute_()const#
inlineat::Tensorangle()const#
inlineat::Tensorsgn()const#
inlineat::Tensor&sgn_()const#
inlineat::Tensorchalf(::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensor_conj()const#
inlineat::Tensor__dispatch_conj()const#
inlineat::Tensor_conj_physical()const#
inlineat::Tensorconj_physical()const#
inlineat::Tensor&conj_physical_()const#
inlineat::Tensorresolve_conj()const#
inlineat::Tensorresolve_neg()const#
inlineat::Tensor_neg_view()const#
inlineat::Tensoracos()const#
inlineat::Tensor&acos_()const#
inlineat::Tensorarccos()const#
inlineat::Tensor&arccos_()const#
inlineat::Tensoradd(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&add_(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensoradd(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&add_(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensoraddmv(constat::Tensor&mat,constat::Tensor&vec,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor&addmv_(constat::Tensor&mat,constat::Tensor&vec,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensoraddr(constat::Tensor&vec1,constat::Tensor&vec2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor&addr_(constat::Tensor&vec1,constat::Tensor&vec2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor_is_all_true()const#
inlineat::Tensor_is_any_true()const#
inlineat::Tensorall(int64_tdim,boolkeepdim=false)const#
inlineat::Tensorall(at::OptionalIntArrayRefdim,boolkeepdim=false)const#
inlineat::Tensorall(at::Dimnamedim,boolkeepdim=false)const#
inlineboolallclose(constat::Tensor&other,doublertol=1e-05,doubleatol=1e-08,boolequal_nan=false)const#
inlineat::Tensorany(int64_tdim,boolkeepdim=false)const#
inlineat::Tensorany(at::OptionalIntArrayRefdim,boolkeepdim=false)const#
inlineat::Tensorany(at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensorargmax(::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensorargmin(::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensoracosh()const#
inlineat::Tensor&acosh_()const#
inlineat::Tensorarccosh()const#
inlineat::Tensor&arccosh_()const#
inlineat::Tensorasinh()const#
inlineat::Tensor&asinh_()const#
inlineat::Tensorarcsinh()const#
inlineat::Tensor&arcsinh_()const#
inlineat::Tensoratanh()const#
inlineat::Tensor&atanh_()const#
inlineat::Tensorarctanh()const#
inlineat::Tensor&arctanh_()const#
inlineat::Tensoras_strided(at::IntArrayRefsize,at::IntArrayRefstride,::std::optional<int64_t>storage_offset=::std::nullopt)const#
inlineat::Tensoras_strided_symint(c10::SymIntArrayRefsize,c10::SymIntArrayRefstride,::std::optional<c10::SymInt>storage_offset=::std::nullopt)const#
inlineconstat::Tensor&as_strided_(at::IntArrayRefsize,at::IntArrayRefstride,::std::optional<int64_t>storage_offset=::std::nullopt)const#
inlineconstat::Tensor&as_strided__symint(c10::SymIntArrayRefsize,c10::SymIntArrayRefstride,::std::optional<c10::SymInt>storage_offset=::std::nullopt)const#
inlineat::Tensorasin()const#
inlineat::Tensor&asin_()const#
inlineat::Tensorarcsin()const#
inlineat::Tensor&arcsin_()const#
inlineat::Tensoratan()const#
inlineat::Tensor&atan_()const#
inlineat::Tensorarctan()const#
inlineat::Tensor&arctan_()const#
inlineat::Tensorbaddbmm(constat::Tensor&batch1,constat::Tensor&batch2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor&baddbmm_(constat::Tensor&batch1,constat::Tensor&batch2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensorbernoulli(::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&bernoulli_(constat::Tensor&p,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&bernoulli_(doublep=0.5,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensorbernoulli(doublep,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensorbincount(const::std::optional<at::Tensor>&weights={},int64_tminlength=0)const#
inlineat::Tensorbincount_symint(const::std::optional<at::Tensor>&weights={},c10::SymIntminlength=0)const#
inlineat::Tensorbitwise_not()const#
inlineat::Tensor&bitwise_not_()const#
inlineat::Tensorcopysign(constat::Tensor&other)const#
inlineat::Tensor&copysign_(constat::Tensor&other)const#
inlineat::Tensorcopysign(constat::Scalar&other)const#
inlineat::Tensor&copysign_(constat::Scalar&other)const#
inlineat::Tensor_lazy_clone()const#
inlineat::Tensorlogical_not()const#
inlineat::Tensor&logical_not_()const#
inlineat::Tensorlogical_xor(constat::Tensor&other)const#
inlineat::Tensor&logical_xor_(constat::Tensor&other)const#
inlineat::Tensorlogical_and(constat::Tensor&other)const#
inlineat::Tensor&logical_and_(constat::Tensor&other)const#
inlineat::Tensorlogical_or(constat::Tensor&other)const#
inlineat::Tensor&logical_or_(constat::Tensor&other)const#
inlineat::Tensorbmm(constat::Tensor&mat2)const#
inlineat::Tensorbroadcast_to(at::IntArrayRefsize)const#
inlineat::Tensorbroadcast_to_symint(c10::SymIntArrayRefsize)const#
inlineat::Tensorceil()const#
inlineat::Tensor&ceil_()const#
inline::std::vector<at::Tensor>unsafe_chunk(int64_tchunks,int64_tdim=0)const#
inline::std::vector<at::Tensor>chunk(int64_tchunks,int64_tdim=0)const#
inline::std::vector<at::Tensor>tensor_split(int64_tsections,int64_tdim=0)const#
inline::std::vector<at::Tensor>tensor_split_symint(c10::SymIntsections,int64_tdim=0)const#
inline::std::vector<at::Tensor>tensor_split(at::IntArrayRefindices,int64_tdim=0)const#
inline::std::vector<at::Tensor>tensor_split_symint(c10::SymIntArrayRefindices,int64_tdim=0)const#
inline::std::vector<at::Tensor>tensor_split(constat::Tensor&tensor_indices_or_sections,int64_tdim=0)const#
inlineat::Tensorclamp(const::std::optional<at::Scalar>&min,const::std::optional<at::Scalar>&max=::std::nullopt)const#
inlineat::Tensorclamp(const::std::optional<at::Tensor>&min={},const::std::optional<at::Tensor>&max={})const#
inlineat::Tensor&clamp_(const::std::optional<at::Scalar>&min,const::std::optional<at::Scalar>&max=::std::nullopt)const#
inlineat::Tensor&clamp_(const::std::optional<at::Tensor>&min={},const::std::optional<at::Tensor>&max={})const#
inlineat::Tensorclamp_max(constat::Scalar&max)const#
inlineat::Tensorclamp_max(constat::Tensor&max)const#
inlineat::Tensor&clamp_max_(constat::Scalar&max)const#
inlineat::Tensor&clamp_max_(constat::Tensor&max)const#
inlineat::Tensorclamp_min(constat::Scalar&min)const#
inlineat::Tensorclamp_min(constat::Tensor&min)const#
inlineat::Tensor&clamp_min_(constat::Scalar&min)const#
inlineat::Tensor&clamp_min_(constat::Tensor&min)const#
inlineat::Tensorclip(const::std::optional<at::Scalar>&min,const::std::optional<at::Scalar>&max=::std::nullopt)const#
inlineat::Tensorclip(const::std::optional<at::Tensor>&min={},const::std::optional<at::Tensor>&max={})const#
inlineat::Tensor&clip_(const::std::optional<at::Scalar>&min,const::std::optional<at::Scalar>&max=::std::nullopt)const#
inlineat::Tensor&clip_(const::std::optional<at::Tensor>&min={},const::std::optional<at::Tensor>&max={})const#
inlineat::Tensor__dispatch_contiguous(at::MemoryFormatmemory_format=c10::MemoryFormat::Contiguous)const#
inlineat::Tensor&copy_(constat::Tensor&src,boolnon_blocking=false)const#
inlineat::Tensorcos()const#
inlineat::Tensor&cos_()const#
inlineat::Tensorcosh()const#
inlineat::Tensor&cosh_()const#
inlineat::Tensorcount_nonzero(at::IntArrayRefdim)const#
inlineat::Tensorcount_nonzero(::std::optional<int64_t>dim=::std::nullopt)const#
inlineat::Tensorcov(int64_tcorrection=1,const::std::optional<at::Tensor>&fweights={},const::std::optional<at::Tensor>&aweights={})const#
inlineat::Tensorcorrcoef()const#
inline::std::tuple<at::Tensor,at::Tensor>cummax(int64_tdim)const#
inline::std::tuple<at::Tensor,at::Tensor>cummax(at::Dimnamedim)const#
inline::std::tuple<at::Tensor,at::Tensor>cummin(int64_tdim)const#
inline::std::tuple<at::Tensor,at::Tensor>cummin(at::Dimnamedim)const#
inlineat::Tensorcumprod(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensor&cumprod_(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorcumprod(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensor&cumprod_(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorcumsum(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensor&cumsum_(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorcumsum(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensor&cumsum_(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensordiag_embed(int64_toffset=0,int64_tdim1=-2,int64_tdim2=-1)const#
inlineat::Tensordiagflat(int64_toffset=0)const#
inlineat::Tensordiagonal(int64_toffset=0,int64_tdim1=0,int64_tdim2=1)const#
inlineat::Tensordiagonal(at::Dimnameoutdim,at::Dimnamedim1,at::Dimnamedim2,int64_toffset=0)const#
inlineat::Tensor&fill_diagonal_(constat::Scalar&fill_value,boolwrap=false)const#
inlineat::Tensordiff(int64_tn=1,int64_tdim=-1,const::std::optional<at::Tensor>&prepend={},const::std::optional<at::Tensor>&append={})const#
inlineat::Tensordiv(constat::Tensor&other)const#
inlineat::Tensor&div_(constat::Tensor&other)const#
inlineat::Tensordiv(constat::Tensor&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensor&div_(constat::Tensor&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensordiv(constat::Scalar&other)const#
inlineat::Tensor&div_(constat::Scalar&other)const#
inlineat::Tensordiv(constat::Scalar&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensor&div_(constat::Scalar&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensordivide(constat::Tensor&other)const#
inlineat::Tensor&divide_(constat::Tensor&other)const#
inlineat::Tensordivide(constat::Scalar&other)const#
inlineat::Tensor&divide_(constat::Scalar&other)const#
inlineat::Tensordivide(constat::Tensor&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensor&divide_(constat::Tensor&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensordivide(constat::Scalar&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensor&divide_(constat::Scalar&other,::std::optional<c10::string_view>rounding_mode)const#
inlineat::Tensortrue_divide(constat::Tensor&other)const#
inlineat::Tensor&true_divide_(constat::Tensor&other)const#
inlineat::Tensortrue_divide(constat::Scalar&other)const#
inlineat::Tensor&true_divide_(constat::Scalar&other)const#
inlineat::Tensordot(constat::Tensor&tensor)const#
inlineat::Tensorvdot(constat::Tensor&other)const#
inlineat::Tensornew_empty(at::IntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_empty(at::IntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_empty_symint(c10::SymIntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_empty_symint(c10::SymIntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_empty_strided(at::IntArrayRefsize,at::IntArrayRefstride,at::TensorOptionsoptions={})const#
inlineat::Tensornew_empty_strided(at::IntArrayRefsize,at::IntArrayRefstride,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_empty_strided_symint(c10::SymIntArrayRefsize,c10::SymIntArrayRefstride,at::TensorOptionsoptions={})const#
inlineat::Tensornew_empty_strided_symint(c10::SymIntArrayRefsize,c10::SymIntArrayRefstride,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_full(at::IntArrayRefsize,constat::Scalar&fill_value,at::TensorOptionsoptions={})const#
inlineat::Tensornew_full(at::IntArrayRefsize,constat::Scalar&fill_value,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_full_symint(c10::SymIntArrayRefsize,constat::Scalar&fill_value,at::TensorOptionsoptions={})const#
inlineat::Tensornew_full_symint(c10::SymIntArrayRefsize,constat::Scalar&fill_value,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_zeros(at::IntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_zeros(at::IntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_zeros_symint(c10::SymIntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_zeros_symint(c10::SymIntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_ones(at::IntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_ones(at::IntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineat::Tensornew_ones_symint(c10::SymIntArrayRefsize,at::TensorOptionsoptions={})const#
inlineat::Tensornew_ones_symint(c10::SymIntArrayRefsize,::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory)const#
inlineconstat::Tensor&resize_(at::IntArrayRefsize,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineconstat::Tensor&resize__symint(c10::SymIntArrayRefsize,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensorerf()const#
inlineat::Tensor&erf_()const#
inlineat::Tensorerfc()const#
inlineat::Tensor&erfc_()const#
inlineat::Tensorexp()const#
inlineat::Tensor&exp_()const#
inlineat::Tensorexp2()const#
inlineat::Tensor&exp2_()const#
inlineat::Tensorexpm1()const#
inlineat::Tensor&expm1_()const#
inlineat::Tensorexpand(at::IntArrayRefsize,boolimplicit=false)const#
inlineat::Tensorexpand_symint(c10::SymIntArrayRefsize,boolimplicit=false)const#
inlineat::Tensorexpand_as(constat::Tensor&other)const#
inlineat::Tensorflatten(int64_tstart_dim=0,int64_tend_dim=-1)const#
inlineat::Tensorflatten(int64_tstart_dim,int64_tend_dim,at::Dimnameout_dim)const#
inlineat::Tensorflatten(at::Dimnamestart_dim,at::Dimnameend_dim,at::Dimnameout_dim)const#
inlineat::Tensorflatten(at::DimnameListdims,at::Dimnameout_dim)const#
inlineat::Tensorunflatten(int64_tdim,at::IntArrayRefsizes)const#
inlineat::Tensorunflatten_symint(int64_tdim,c10::SymIntArrayRefsizes)const#
inlineat::Tensorunflatten(at::Dimnamedim,at::IntArrayRefsizes,at::DimnameListnames)const#
inlineat::Tensorunflatten_symint(at::Dimnamedim,c10::SymIntArrayRefsizes,at::DimnameListnames)const#
inlineat::Tensor&fill_(constat::Scalar&value)const#
inlineat::Tensor&fill_(constat::Tensor&value)const#
inlineat::Tensorfloor()const#
inlineat::Tensor&floor_()const#
inlineat::Tensorfloor_divide(constat::Tensor&other)const#
inlineat::Tensor&floor_divide_(constat::Tensor&other)const#
inlineat::Tensorfloor_divide(constat::Scalar&other)const#
inlineat::Tensor&floor_divide_(constat::Scalar&other)const#
inlineat::Tensorfrac()const#
inlineat::Tensor&frac_()const#
inlineat::Tensorgcd(constat::Tensor&other)const#
inlineat::Tensor&gcd_(constat::Tensor&other)const#
inlineat::Tensorlcm(constat::Tensor&other)const#
inlineat::Tensor&lcm_(constat::Tensor&other)const#
inlineat::Tensorindex(constc10::List<::std::optional<at::Tensor>>&indices)const#
inlineat::Tensor&index_copy_(int64_tdim,constat::Tensor&index,constat::Tensor&source)const#
inlineat::Tensorindex_copy(int64_tdim,constat::Tensor&index,constat::Tensor&source)const#
inlineat::Tensor&index_copy_(at::Dimnamedim,constat::Tensor&index,constat::Tensor&source)const#
inlineat::Tensorindex_copy(at::Dimnamedim,constat::Tensor&index,constat::Tensor&source)const#
inlineat::Tensor&index_put_(constc10::List<::std::optional<at::Tensor>>&indices,constat::Tensor&values,boolaccumulate=false)const#
inlineat::Tensorindex_put(constc10::List<::std::optional<at::Tensor>>&indices,constat::Tensor&values,boolaccumulate=false)const#
inlineat::Tensorisclose(constat::Tensor&other,doublertol=1e-05,doubleatol=1e-08,boolequal_nan=false)const#
inlineat::Tensorisnan()const#
inlineboolis_distributed()const#
inlinebool__dispatch_is_floating_point()const#
inlinebool__dispatch_is_complex()const#
inlinebool__dispatch_is_conj()const#
inlinebool__dispatch__is_zerotensor()const#
inlinebool__dispatch_is_neg()const#
inlineat::Tensorisreal()const#
inlineboolis_nonzero()const#
inlineboolis_same_size(constat::Tensor&other)const#
inlinebool__dispatch_is_signed()const#
inlinebool__dispatch_is_inference()const#
inlineat::Tensorkron(constat::Tensor&other)const#
inline::std::tuple<at::Tensor,at::Tensor>kthvalue(int64_tk,int64_tdim=-1,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>kthvalue_symint(c10::SymIntk,int64_tdim=-1,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>kthvalue(int64_tk,at::Dimnamedim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>kthvalue_symint(c10::SymIntk,at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensornan_to_num(::std::optional<double>nan=::std::nullopt,::std::optional<double>posinf=::std::nullopt,::std::optional<double>neginf=::std::nullopt)const#
inlineat::Tensor&nan_to_num_(::std::optional<double>nan=::std::nullopt,::std::optional<double>posinf=::std::nullopt,::std::optional<double>neginf=::std::nullopt)const#
inlineat::Tensorldexp(constat::Tensor&other)const#
inlineat::Tensor&ldexp_(constat::Tensor&other)const#
inlineat::Tensorlog()const#
inlineat::Tensor&log_()const#
inlineat::Tensorlog10()const#
inlineat::Tensor&log10_()const#
inlineat::Tensorlog1p()const#
inlineat::Tensor&log1p_()const#
inlineat::Tensorlog2()const#
inlineat::Tensor&log2_()const#
inlineat::Tensorlogaddexp(constat::Tensor&other)const#
inlineat::Tensorlogaddexp2(constat::Tensor&other)const#
inlineat::Tensorxlogy(constat::Tensor&other)const#
inlineat::Tensorxlogy(constat::Scalar&other)const#
inlineat::Tensor&xlogy_(constat::Tensor&other)const#
inlineat::Tensor&xlogy_(constat::Scalar&other)const#
inlineat::Tensorlog_softmax(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorlog_softmax(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorlogcumsumexp(int64_tdim)const#
inlineat::Tensorlogcumsumexp(at::Dimnamedim)const#
inlineat::Tensorlogsumexp(at::IntArrayRefdim,boolkeepdim=false)const#
inlineat::Tensorlogsumexp(at::DimnameListdim,boolkeepdim=false)const#
inlineat::Tensormatmul(constat::Tensor&other)const#
inlineat::Tensormatrix_power(int64_tn)const#
inlineat::Tensormatrix_exp()const#
inline::std::tuple<at::Tensor,at::Tensor>aminmax(::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>max(int64_tdim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>max(at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensoramax(at::IntArrayRefdim={},boolkeepdim=false)const#
inlineat::Tensormean(::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensormean(at::OptionalIntArrayRefdim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensormean(at::DimnameListdim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensornanmean(at::OptionalIntArrayRefdim=::std::nullopt,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensormedian()const#
inline::std::tuple<at::Tensor,at::Tensor>median(int64_tdim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>median(at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensornanmedian()const#
inline::std::tuple<at::Tensor,at::Tensor>nanmedian(int64_tdim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>nanmedian(at::Dimnamedim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>min(int64_tdim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>min(at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensoramin(at::IntArrayRefdim={},boolkeepdim=false)const#
inlineat::Tensormm(constat::Tensor&mat2)const#
inline::std::tuple<at::Tensor,at::Tensor>mode(int64_tdim=-1,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>mode(at::Dimnamedim,boolkeepdim=false)const#
inlineat::Tensormul(constat::Tensor&other)const#
inlineat::Tensor&mul_(constat::Tensor&other)const#
inlineat::Tensormul(constat::Scalar&other)const#
inlineat::Tensor&mul_(constat::Scalar&other)const#
inlineat::Tensormultiply(constat::Tensor&other)const#
inlineat::Tensor&multiply_(constat::Tensor&other)const#
inlineat::Tensormultiply(constat::Scalar&other)const#
inlineat::Tensor&multiply_(constat::Scalar&other)const#
inlineat::Tensormv(constat::Tensor&vec)const#
inlineat::Tensormvlgamma(int64_tp)const#
inlineat::Tensor&mvlgamma_(int64_tp)const#
inlineat::Tensornarrow_copy(int64_tdim,int64_tstart,int64_tlength)const#
inlineat::Tensornarrow_copy_symint(int64_tdim,c10::SymIntstart,c10::SymIntlength)const#
inlineat::Tensornarrow(int64_tdim,int64_tstart,int64_tlength)const#
inlineat::Tensornarrow_symint(int64_tdim,c10::SymIntstart,c10::SymIntlength)const#
inlineat::Tensornarrow(int64_tdim,constat::Tensor&start,int64_tlength)const#
inlineat::Tensornarrow_symint(int64_tdim,constat::Tensor&start,c10::SymIntlength)const#
inlineat::Tensorpermute(at::IntArrayRefdims)const#
inlineat::Tensormovedim(at::IntArrayRefsource,at::IntArrayRefdestination)const#
inlineat::Tensormovedim(int64_tsource,int64_tdestination)const#
inlineat::Tensormoveaxis(at::IntArrayRefsource,at::IntArrayRefdestination)const#
inlineat::Tensormoveaxis(int64_tsource,int64_tdestination)const#
inlineat::Tensornumpy_T()const#
inlineat::Tensormatrix_H()const#
inlineat::TensormT()const#
inlineat::TensormH()const#
inlineat::Tensoradjoint()const#
inlineboolis_pinned(::std::optional<at::Device>device=::std::nullopt)const#
inlineat::Tensorpin_memory(::std::optional<at::Device>device=::std::nullopt)const#
inlineat::Tensorpinverse(doublercond=1e-15)const#
inlineat::Tensorrad2deg()const#
inlineat::Tensor&rad2deg_()const#
inlineat::Tensordeg2rad()const#
inlineat::Tensor&deg2rad_()const#
inlineat::Tensorravel()const#
inlineat::Tensorreciprocal()const#
inlineat::Tensor&reciprocal_()const#
inlineat::Tensorneg()const#
inlineat::Tensor&neg_()const#
inlineat::Tensornegative()const#
inlineat::Tensor&negative_()const#
inlineat::Tensorrepeat(at::IntArrayRefrepeats)const#
inlineat::Tensorrepeat_symint(c10::SymIntArrayRefrepeats)const#
inlineat::Tensorrepeat_interleave(constat::Tensor&repeats,::std::optional<int64_t>dim=::std::nullopt,::std::optional<int64_t>output_size=::std::nullopt)const#
inlineat::Tensorrepeat_interleave_symint(constat::Tensor&repeats,::std::optional<int64_t>dim=::std::nullopt,::std::optional<c10::SymInt>output_size=::std::nullopt)const#
inlineat::Tensorrepeat_interleave(int64_trepeats,::std::optional<int64_t>dim=::std::nullopt,::std::optional<int64_t>output_size=::std::nullopt)const#
inlineat::Tensorrepeat_interleave_symint(c10::SymIntrepeats,::std::optional<int64_t>dim=::std::nullopt,::std::optional<c10::SymInt>output_size=::std::nullopt)const#
inlineat::Tensorreshape(at::IntArrayRefshape)const#
inlineat::Tensorreshape_symint(c10::SymIntArrayRefshape)const#
inlineat::Tensor_reshape_alias(at::IntArrayRefsize,at::IntArrayRefstride)const#
inlineat::Tensor_reshape_alias_symint(c10::SymIntArrayRefsize,c10::SymIntArrayRefstride)const#
inlineat::Tensorreshape_as(constat::Tensor&other)const#
inlineat::Tensorround()const#
inlineat::Tensor&round_()const#
inlineat::Tensorround(int64_tdecimals)const#
inlineat::Tensor&round_(int64_tdecimals)const#
inlineat::Tensorrelu()const#
inlineat::Tensor&relu_()const#
inlineat::Tensorprelu(constat::Tensor&weight)const#
inlineat::Tensorhardshrink(constat::Scalar&lambd=0.5)const#
inlineat::Tensorhardshrink_backward(constat::Tensor&grad_out,constat::Scalar&lambd)const#
inlineat::Tensorrsqrt()const#
inlineat::Tensor&rsqrt_()const#
inlineat::Tensorselect(at::Dimnamedim,int64_tindex)const#
inlineat::Tensorselect(int64_tdim,int64_tindex)const#
inlineat::Tensorselect_symint(int64_tdim,c10::SymIntindex)const#
inlineat::Tensorsigmoid()const#
inlineat::Tensor&sigmoid_()const#
inlineat::Tensorlogit(::std::optional<double>eps=::std::nullopt)const#
inlineat::Tensor&logit_(::std::optional<double>eps=::std::nullopt)const#
inlineat::Tensorsin()const#
inlineat::Tensor&sin_()const#
inlineat::Tensorsinc()const#
inlineat::Tensor&sinc_()const#
inlineat::Tensorsinh()const#
inlineat::Tensor&sinh_()const#
inlineat::Tensordetach()const#

Returns a newTensor, detached from the current graph.

The result will never require gradient.

inlineat::Tensor&detach_()const#

Detaches theTensor from the graph that created it, making it a leaf.

Views cannot be detached in-place.

inlineint64_tsize(at::Dimnamedim)const#
inlineat::Tensorslice(int64_tdim=0,::std::optional<int64_t>start=::std::nullopt,::std::optional<int64_t>end=::std::nullopt,int64_tstep=1)const#
inlineat::Tensorslice_symint(int64_tdim=0,::std::optional<c10::SymInt>start=::std::nullopt,::std::optional<c10::SymInt>end=::std::nullopt,c10::SymIntstep=1)const#
inlineat::Tensorslice_inverse(constat::Tensor&src,int64_tdim=0,::std::optional<int64_t>start=::std::nullopt,::std::optional<int64_t>end=::std::nullopt,int64_tstep=1)const#
inlineat::Tensorslice_inverse_symint(constat::Tensor&src,int64_tdim=0,::std::optional<c10::SymInt>start=::std::nullopt,::std::optional<c10::SymInt>end=::std::nullopt,c10::SymIntstep=1)const#
inlineat::Tensorslice_scatter(constat::Tensor&src,int64_tdim=0,::std::optional<int64_t>start=::std::nullopt,::std::optional<int64_t>end=::std::nullopt,int64_tstep=1)const#
inlineat::Tensorslice_scatter_symint(constat::Tensor&src,int64_tdim=0,::std::optional<c10::SymInt>start=::std::nullopt,::std::optional<c10::SymInt>end=::std::nullopt,c10::SymIntstep=1)const#
inlineat::Tensorselect_scatter(constat::Tensor&src,int64_tdim,int64_tindex)const#
inlineat::Tensorselect_scatter_symint(constat::Tensor&src,int64_tdim,c10::SymIntindex)const#
inlineat::Tensordiagonal_scatter(constat::Tensor&src,int64_toffset=0,int64_tdim1=0,int64_tdim2=1)const#
inlineat::Tensoras_strided_scatter(constat::Tensor&src,at::IntArrayRefsize,at::IntArrayRefstride,::std::optional<int64_t>storage_offset=::std::nullopt)const#
inlineat::Tensoras_strided_scatter_symint(constat::Tensor&src,c10::SymIntArrayRefsize,c10::SymIntArrayRefstride,::std::optional<c10::SymInt>storage_offset=::std::nullopt)const#
inlineat::Tensorsmm(constat::Tensor&mat2)const#
inlineat::Tensorsoftmax(int64_tdim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorsoftmax(at::Dimnamedim,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inline::std::vector<at::Tensor>unsafe_split(int64_tsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>unsafe_split_symint(c10::SymIntsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>split(int64_tsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>split_symint(c10::SymIntsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>split(at::IntArrayRefsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>split_symint(c10::SymIntArrayRefsplit_size,int64_tdim=0)const#
inline::std::vector<at::Tensor>unsafe_split_with_sizes(at::IntArrayRefsplit_sizes,int64_tdim=0)const#
inline::std::vector<at::Tensor>unsafe_split_with_sizes_symint(c10::SymIntArrayRefsplit_sizes,int64_tdim=0)const#
inline::std::vector<at::Tensor>split_with_sizes(at::IntArrayRefsplit_sizes,int64_tdim=0)const#
inline::std::vector<at::Tensor>split_with_sizes_symint(c10::SymIntArrayRefsplit_sizes,int64_tdim=0)const#
inline::std::vector<at::Tensor>hsplit(int64_tsections)const#
inline::std::vector<at::Tensor>hsplit(at::IntArrayRefindices)const#
inline::std::vector<at::Tensor>vsplit(int64_tsections)const#
inline::std::vector<at::Tensor>vsplit(at::IntArrayRefindices)const#
inline::std::vector<at::Tensor>dsplit(int64_tsections)const#
inline::std::vector<at::Tensor>dsplit(at::IntArrayRefindices)const#
inlineat::Tensorsqueeze()const#
inlineat::Tensorsqueeze(int64_tdim)const#
inlineat::Tensorsqueeze(at::Dimnamedim)const#
inlineat::Tensorsqueeze(at::IntArrayRefdim)const#
inlineat::Tensor&squeeze_()const#
inlineat::Tensor&squeeze_(int64_tdim)const#
inlineat::Tensor&squeeze_(at::IntArrayRefdim)const#
inlineat::Tensor&squeeze_(at::Dimnamedim)const#
inlineat::Tensorsspaddmm(constat::Tensor&mat1,constat::Tensor&mat2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensorstft(int64_tn_fft,::std::optional<int64_t>hop_length,::std::optional<int64_t>win_length,const::std::optional<at::Tensor>&window,boolnormalized,::std::optional<bool>onesided=::std::nullopt,::std::optional<bool>return_complex=::std::nullopt,::std::optional<bool>align_to_window=::std::nullopt)const#
inlineat::Tensorstft(int64_tn_fft,::std::optional<int64_t>hop_length=::std::nullopt,::std::optional<int64_t>win_length=::std::nullopt,const::std::optional<at::Tensor>&window={},boolcenter=true,c10::string_viewpad_mode="reflect",boolnormalized=false,::std::optional<bool>onesided=::std::nullopt,::std::optional<bool>return_complex=::std::nullopt,::std::optional<bool>align_to_window=::std::nullopt)const#
inlineat::Tensoristft(int64_tn_fft,::std::optional<int64_t>hop_length=::std::nullopt,::std::optional<int64_t>win_length=::std::nullopt,const::std::optional<at::Tensor>&window={},boolcenter=true,boolnormalized=false,::std::optional<bool>onesided=::std::nullopt,::std::optional<int64_t>length=::std::nullopt,boolreturn_complex=false)const#
inlineint64_tstride(at::Dimnamedim)const#
inlineat::Tensorsum(::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorsum(at::OptionalIntArrayRefdim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorsum(at::DimnameListdim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensornansum(at::OptionalIntArrayRefdim=::std::nullopt,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorhash_tensor(at::IntArrayRefdim={},boolkeepdim=false,int64_tmode=0)const#
inlineat::Tensorsum_to_size(at::IntArrayRefsize)const#
inlineat::Tensorsum_to_size_symint(c10::SymIntArrayRefsize)const#
inlineat::Tensorsqrt()const#
inlineat::Tensor&sqrt_()const#
inlineat::Tensorsquare()const#
inlineat::Tensor&square_()const#
inlineat::Tensorstd(boolunbiased)const#
inlineat::Tensorstd(at::OptionalIntArrayRefdim,boolunbiased,boolkeepdim=false)const#
inlineat::Tensorstd(at::OptionalIntArrayRefdim=::std::nullopt,const::std::optional<at::Scalar>&correction=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensorstd(at::DimnameListdim,boolunbiased,boolkeepdim=false)const#
inlineat::Tensorstd(at::DimnameListdim,const::std::optional<at::Scalar>&correction=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensorprod(::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorprod(int64_tdim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensorprod(at::Dimnamedim,boolkeepdim=false,::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensort()const#
inlineat::Tensor&t_()const#
inlineat::Tensortan()const#
inlineat::Tensor&tan_()const#
inlineat::Tensortanh()const#
inlineat::Tensor&tanh_()const#
inlineat::Tensortile(at::IntArrayRefdims)const#
inlineat::Tensortile_symint(c10::SymIntArrayRefdims)const#
inlineat::Tensortranspose(int64_tdim0,int64_tdim1)const#
inlineat::Tensortranspose(at::Dimnamedim0,at::Dimnamedim1)const#
inlineat::Tensor&transpose_(int64_tdim0,int64_tdim1)const#
inlineat::Tensorflip(at::IntArrayRefdims)const#
inlineat::Tensorfliplr()const#
inlineat::Tensorflipud()const#
inlineat::Tensorroll(at::IntArrayRefshifts,at::IntArrayRefdims={})const#
inlineat::Tensorroll_symint(c10::SymIntArrayRefshifts,at::IntArrayRefdims={})const#
inlineat::Tensorrot90(int64_tk=1,at::IntArrayRefdims={0,1})const#
inlineat::Tensor_nested_tensor_size()const#
inlineat::Tensor_nested_tensor_strides()const#
inlineat::Tensor_nested_tensor_storage_offsets()const#
inlineat::Tensortrunc()const#
inlineat::Tensor&trunc_()const#
inlineat::Tensorfix()const#
inlineat::Tensor&fix_()const#
inlineat::Tensortype_as(constat::Tensor&other)const#
inlineat::Tensorunsqueeze(int64_tdim)const#
inlineat::Tensor&unsqueeze_(int64_tdim)const#
inlineat::Tensorvar(boolunbiased)const#
inlineat::Tensorvar(at::OptionalIntArrayRefdim,boolunbiased,boolkeepdim=false)const#
inlineat::Tensorvar(at::OptionalIntArrayRefdim=::std::nullopt,const::std::optional<at::Scalar>&correction=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensorvar(at::DimnameListdim,boolunbiased,boolkeepdim=false)const#
inlineat::Tensorvar(at::DimnameListdim,const::std::optional<at::Scalar>&correction=::std::nullopt,boolkeepdim=false)const#
inlineat::Tensorview_as(constat::Tensor&other)const#
inlineat::Tensorwhere(constat::Tensor&condition,constat::Tensor&other)const#
inlineat::Tensorwhere(constat::Tensor&condition,constat::Scalar&other)const#
inlineat::Tensornorm(const::std::optional<at::Scalar>&p,at::ScalarTypedtype)const#
inlineat::Tensornorm(constat::Scalar&p=2)const#
inlineat::Tensornorm(const::std::optional<at::Scalar>&p,at::IntArrayRefdim,boolkeepdim,at::ScalarTypedtype)const#
inlineat::Tensornorm(const::std::optional<at::Scalar>&p,at::IntArrayRefdim,boolkeepdim=false)const#
inlineat::Tensornorm(const::std::optional<at::Scalar>&p,at::DimnameListdim,boolkeepdim,at::ScalarTypedtype)const#
inlineat::Tensornorm(const::std::optional<at::Scalar>&p,at::DimnameListdim,boolkeepdim=false)const#
inline::std::tuple<at::Tensor,at::Tensor>frexp()const#
inlineat::Tensorclone(::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensorpositive()const#
inlineconstat::Tensor&resize_as_(constat::Tensor&the_template,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineconstat::Tensor&resize_as_sparse_(constat::Tensor&the_template)const#
inlineat::Tensor&zero_()const#
inlineat::Tensorsub(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&sub_(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensorsub(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&sub_(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensorsubtract(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&subtract_(constat::Tensor&other,constat::Scalar&alpha=1)const#
inlineat::Tensorsubtract(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensor&subtract_(constat::Scalar&other,constat::Scalar&alpha=1)const#
inlineat::Tensorheaviside(constat::Tensor&values)const#
inlineat::Tensor&heaviside_(constat::Tensor&values)const#
inlineat::Tensoraddmm(constat::Tensor&mat1,constat::Tensor&mat2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor&addmm_(constat::Tensor&mat1,constat::Tensor&mat2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor_addmm_activation(constat::Tensor&mat1,constat::Tensor&mat2,constat::Scalar&beta=1,constat::Scalar&alpha=1,booluse_gelu=false)const#
inlineconstat::Tensor&sparse_resize_(at::IntArrayRefsize,int64_tsparse_dim,int64_tdense_dim)const#
inlineconstat::Tensor&sparse_resize_and_clear_(at::IntArrayRefsize,int64_tsparse_dim,int64_tdense_dim)const#
inlineat::Tensorsparse_mask(constat::Tensor&mask)const#
inlineat::Tensor_sparse_mask_projection(constat::Tensor&mask,boolaccumulate_matches=false)const#
inlineat::Tensorto_dense(::std::optional<at::ScalarType>dtype=::std::nullopt,::std::optional<bool>masked_grad=::std::nullopt)const#
inlineat::Tensor_to_dense(::std::optional<at::ScalarType>dtype=::std::nullopt,::std::optional<bool>masked_grad=::std::nullopt)const#
inlineint64_tsparse_dim()const#
inlineint64_t_dimI()const#
inlineint64_tdense_dim()const#
inlineint64_t_dimV()const#
inlineint64_t_nnz()const#
inlineat::Tensorcoalesce()const#
inlineboolis_coalesced()const#
inlineat::Tensor_indices()const#
inlineat::Tensor_values()const#
inlineat::Tensor&_coalesced_(boolcoalesced)const#
inlineat::Tensorindices()const#
inlineat::Tensorvalues()const#
inlineat::Tensorcrow_indices()const#
inlineat::Tensorcol_indices()const#
inlineat::Tensorccol_indices()const#
inlineat::Tensorrow_indices()const#
inline::std::vector<at::Tensor>unbind(int64_tdim=0)const#
inline::std::vector<at::Tensor>unbind(at::Dimnamedim)const#
inlineat::Tensorto_sparse(int64_tsparse_dim)const#
inlineat::Tensor_to_sparse(int64_tsparse_dim)const#
inlineat::Tensorto_sparse(::std::optional<at::Layout>layout=::std::nullopt,at::OptionalIntArrayRefblocksize=::std::nullopt,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensor_to_sparse(::std::optional<at::Layout>layout=::std::nullopt,at::OptionalIntArrayRefblocksize=::std::nullopt,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensorto_sparse_csr(::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensor_to_sparse_csr(::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensorto_sparse_csc(::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensor_to_sparse_csc(::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensorto_sparse_bsr(at::IntArrayRefblocksize,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensor_to_sparse_bsr(at::IntArrayRefblocksize,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensorto_sparse_bsc(at::IntArrayRefblocksize,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensor_to_sparse_bsc(at::IntArrayRefblocksize,::std::optional<int64_t>dense_dim=::std::nullopt)const#
inlineat::Tensorto_mkldnn(::std::optional<at::ScalarType>dtype=::std::nullopt)const#
inlineat::Tensordequantize()const#
inlinedoubleq_scale()const#
inlineint64_tq_zero_point()const#
inlineat::Tensorq_per_channel_scales()const#
inlineat::Tensorq_per_channel_zero_points()const#
inlineint64_tq_per_channel_axis()const#
inlineat::Tensorint_repr()const#
inlineat::QSchemeqscheme()const#
inlineat::Tensor_autocast_to_reduced_precision(boolcuda_enabled,boolcpu_enabled,at::ScalarTypecuda_dtype,at::ScalarTypecpu_dtype)const#
inlineat::Tensor_autocast_to_full_precision(boolcuda_enabled,boolcpu_enabled)const#
inlineat::Tensorto(at::TensorOptionsoptions={},boolnon_blocking=false,boolcopy=false,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensorto(::std::optional<at::ScalarType>dtype,::std::optional<at::Layout>layout,::std::optional<at::Device>device,::std::optional<bool>pin_memory,boolnon_blocking,boolcopy,::std::optional<at::MemoryFormat>memory_format)const#
inlineat::Tensorto(at::Devicedevice,at::ScalarTypedtype,boolnon_blocking=false,boolcopy=false,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensorto(at::ScalarTypedtype,boolnon_blocking=false,boolcopy=false,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Tensorto(constat::Tensor&other,boolnon_blocking=false,boolcopy=false,::std::optional<at::MemoryFormat>memory_format=::std::nullopt)const#
inlineat::Scalaritem()const#
inlineat::Tensor&set_(at::Storagesource)const#
inlineat::Tensor&set_(at::Storagesource,int64_tstorage_offset,at::IntArrayRefsize,at::IntArrayRefstride={})const#
inlineat::Tensor&set__symint(at::Storagesource,c10::SymIntstorage_offset,c10::SymIntArrayRefsize,c10::SymIntArrayRefstride={})const#
inlineat::Tensor&set_(constat::Tensor&source,int64_tstorage_offset,at::IntArrayRefsize,at::IntArrayRefstride={})const#
inlineat::Tensor&set__symint(constat::Tensor&source,c10::SymIntstorage_offset,c10::SymIntArrayRefsize,c10::SymIntArrayRefstride={})const#
inlineat::Tensor&set_(constat::Tensor&source)const#
inlineat::Tensor&set_()const#
inlineboolis_set_to(constat::Tensor&tensor)const#
inlineat::Tensor&masked_fill_(constat::Tensor&mask,constat::Scalar&value)const#
inlineat::Tensormasked_fill(constat::Tensor&mask,constat::Scalar&value)const#
inlineat::Tensor&masked_fill_(constat::Tensor&mask,constat::Tensor&value)const#
inlineat::Tensormasked_fill(constat::Tensor&mask,constat::Tensor&value)const#
inlineat::Tensor&masked_scatter_(constat::Tensor&mask,constat::Tensor&source)const#
inlineat::Tensormasked_scatter(constat::Tensor&mask,constat::Tensor&source)const#
inlineat::Tensorview(at::IntArrayRefsize)const#
inlineat::Tensorview_symint(c10::SymIntArrayRefsize)const#
inlineat::Tensorview(at::ScalarTypedtype)const#
inlineat::Tensor&put_(constat::Tensor&index,constat::Tensor&source,boolaccumulate=false)const#
inlineat::Tensorput(constat::Tensor&index,constat::Tensor&source,boolaccumulate=false)const#
inlineat::Tensor&index_add_(int64_tdim,constat::Tensor&index,constat::Tensor&source,constat::Scalar&alpha=1)const#
inlineat::Tensorindex_add(int64_tdim,constat::Tensor&index,constat::Tensor&source,constat::Scalar&alpha=1)const#
inlineat::Tensorindex_add(at::Dimnamedim,constat::Tensor&index,constat::Tensor&source,constat::Scalar&alpha=1)const#
inlineat::Tensor&index_reduce_(int64_tdim,constat::Tensor&index,constat::Tensor&source,c10::string_viewreduce,boolinclude_self=true)const#
inlineat::Tensorindex_reduce(int64_tdim,constat::Tensor&index,constat::Tensor&source,c10::string_viewreduce,boolinclude_self=true)const#
inlineat::Tensor&index_fill_(int64_tdim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensorindex_fill(int64_tdim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensor&index_fill_(int64_tdim,constat::Tensor&index,constat::Tensor&value)const#
inlineat::Tensorindex_fill(int64_tdim,constat::Tensor&index,constat::Tensor&value)const#
inlineat::Tensor&index_fill_(at::Dimnamedim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensor&index_fill_(at::Dimnamedim,constat::Tensor&index,constat::Tensor&value)const#
inlineat::Tensorindex_fill(at::Dimnamedim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensorindex_fill(at::Dimnamedim,constat::Tensor&index,constat::Tensor&value)const#
inlineat::Tensorscatter(int64_tdim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensor&scatter_(int64_tdim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensorscatter(int64_tdim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensor&scatter_(int64_tdim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensorscatter(int64_tdim,constat::Tensor&index,constat::Tensor&src,c10::string_viewreduce)const#
inlineat::Tensor&scatter_(int64_tdim,constat::Tensor&index,constat::Tensor&src,c10::string_viewreduce)const#
inlineat::Tensorscatter(int64_tdim,constat::Tensor&index,constat::Scalar&value,c10::string_viewreduce)const#
inlineat::Tensor&scatter_(int64_tdim,constat::Tensor&index,constat::Scalar&value,c10::string_viewreduce)const#
inlineat::Tensorscatter(at::Dimnamedim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensorscatter(at::Dimnamedim,constat::Tensor&index,constat::Scalar&value)const#
inlineat::Tensorscatter_add(int64_tdim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensor&scatter_add_(int64_tdim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensorscatter_add(at::Dimnamedim,constat::Tensor&index,constat::Tensor&src)const#
inlineat::Tensorscatter_reduce(int64_tdim,constat::Tensor&index,constat::Tensor&src,c10::string_viewreduce,boolinclude_self=true)const#
inlineat::Tensor&scatter_reduce_(int64_tdim,constat::Tensor&index,constat::Tensor&src,c10::string_viewreduce,boolinclude_self=true)const#
inlineat::Tensor&eq_(constat::Scalar&other)const#
inlineat::Tensor&eq_(constat::Tensor&other)const#
inlineat::Tensorbitwise_and(constat::Scalar&other)const#
inlineat::Tensorbitwise_and(constat::Tensor&other)const#
inlineat::Tensor&bitwise_and_(constat::Scalar&other)const#
inlineat::Tensor&bitwise_and_(constat::Tensor&other)const#
inlineat::Tensor__and__(constat::Scalar&other)const#
inlineat::Tensor__and__(constat::Tensor&other)const#
inlineat::Tensor&__iand__(constat::Scalar&other)const#
inlineat::Tensor&__iand__(constat::Tensor&other)const#
inlineat::Tensorbitwise_or(constat::Scalar&other)const#
inlineat::Tensorbitwise_or(constat::Tensor&other)const#
inlineat::Tensor&bitwise_or_(constat::Scalar&other)const#
inlineat::Tensor&bitwise_or_(constat::Tensor&other)const#
inlineat::Tensor__or__(constat::Scalar&other)const#
inlineat::Tensor__or__(constat::Tensor&other)const#
inlineat::Tensor&__ior__(constat::Scalar&other)const#
inlineat::Tensor&__ior__(constat::Tensor&other)const#
inlineat::Tensorbitwise_xor(constat::Scalar&other)const#
inlineat::Tensorbitwise_xor(constat::Tensor&other)const#
inlineat::Tensor&bitwise_xor_(constat::Scalar&other)const#
inlineat::Tensor&bitwise_xor_(constat::Tensor&other)const#
inlineat::Tensor__xor__(constat::Scalar&other)const#
inlineat::Tensor__xor__(constat::Tensor&other)const#
inlineat::Tensor&__ixor__(constat::Scalar&other)const#
inlineat::Tensor&__ixor__(constat::Tensor&other)const#
inlineat::Tensor__lshift__(constat::Scalar&other)const#
inlineat::Tensor__lshift__(constat::Tensor&other)const#
inlineat::Tensor&__ilshift__(constat::Scalar&other)const#
inlineat::Tensor&__ilshift__(constat::Tensor&other)const#
inlineat::Tensorbitwise_left_shift(constat::Tensor&other)const#
inlineat::Tensor&bitwise_left_shift_(constat::Tensor&other)const#
inlineat::Tensorbitwise_left_shift(constat::Scalar&other)const#
inlineat::Tensor&bitwise_left_shift_(constat::Scalar&other)const#
inlineat::Tensor__rshift__(constat::Scalar&other)const#
inlineat::Tensor__rshift__(constat::Tensor&other)const#
inlineat::Tensor&__irshift__(constat::Scalar&other)const#
inlineat::Tensor&__irshift__(constat::Tensor&other)const#
inlineat::Tensorbitwise_right_shift(constat::Tensor&other)const#
inlineat::Tensor&bitwise_right_shift_(constat::Tensor&other)const#
inlineat::Tensorbitwise_right_shift(constat::Scalar&other)const#
inlineat::Tensor&bitwise_right_shift_(constat::Scalar&other)const#
inlineat::Tensor&tril_(int64_tdiagonal=0)const#
inlineat::Tensor&tril__symint(c10::SymIntdiagonal=0)const#
inlineat::Tensor&triu_(int64_tdiagonal=0)const#
inlineat::Tensor&triu__symint(c10::SymIntdiagonal=0)const#
inlineat::Tensor&digamma_()const#
inlineat::Tensor&lerp_(constat::Tensor&end,constat::Scalar&weight)const#
inlineat::Tensor&lerp_(constat::Tensor&end,constat::Tensor&weight)const#
inlineat::Tensor&addbmm_(constat::Tensor&batch1,constat::Tensor&batch2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensoraddbmm(constat::Tensor&batch1,constat::Tensor&batch2,constat::Scalar&beta=1,constat::Scalar&alpha=1)const#
inlineat::Tensor&random_(int64_tfrom,::std::optional<int64_t>to,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&random_(int64_tto,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&random_(::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&uniform_(doublefrom=0,doubleto=1,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&cauchy_(doublemedian=0,doublesigma=1,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&log_normal_(doublemean=1,doublestd=2,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&exponential_(doublelambd=1,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&geometric_(doublep,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensordiag(int64_tdiagonal=0)const#
inlineat::Tensorcross(constat::Tensor&other,::std::optional<int64_t>dim=::std::nullopt)const#
inlineat::Tensortriu(int64_tdiagonal=0)const#
inlineat::Tensortriu_symint(c10::SymIntdiagonal=0)const#
inlineat::Tensortril(int64_tdiagonal=0)const#
inlineat::Tensortril_symint(c10::SymIntdiagonal=0)const#
inlineat::Tensortrace()const#
inlineat::Tensorne(constat::Scalar&other)const#
inlineat::Tensorne(constat::Tensor&other)const#
inlineat::Tensor&ne_(constat::Scalar&other)const#
inlineat::Tensor&ne_(constat::Tensor&other)const#
inlineat::Tensornot_equal(constat::Scalar&other)const#
inlineat::Tensornot_equal(constat::Tensor&other)const#
inlineat::Tensor&not_equal_(constat::Scalar&other)const#
inlineat::Tensor&not_equal_(constat::Tensor&other)const#
inlineat::Tensoreq(constat::Scalar&other)const#
inlineat::Tensoreq(constat::Tensor&other)const#
inlineat::Tensorge(constat::Scalar&other)const#
inlineat::Tensorge(constat::Tensor&other)const#
inlineat::Tensor&ge_(constat::Scalar&other)const#
inlineat::Tensor&ge_(constat::Tensor&other)const#
inlineat::Tensorgreater_equal(constat::Scalar&other)const#
inlineat::Tensorgreater_equal(constat::Tensor&other)const#
inlineat::Tensor&greater_equal_(constat::Scalar&other)const#
inlineat::Tensor&greater_equal_(constat::Tensor&other)const#
inlineat::Tensorle(constat::Scalar&other)const#
inlineat::Tensorle(constat::Tensor&other)const#
inlineat::Tensor&le_(constat::Scalar&other)const#
inlineat::Tensor&le_(constat::Tensor&other)const#
inlineat::Tensorless_equal(constat::Scalar&other)const#
inlineat::Tensorless_equal(constat::Tensor&other)const#
inlineat::Tensor&less_equal_(constat::Scalar&other)const#
inlineat::Tensor&less_equal_(constat::Tensor&other)const#
inlineat::Tensorgt(constat::Scalar&other)const#
inlineat::Tensorgt(constat::Tensor&other)const#
inlineat::Tensor&gt_(constat::Scalar&other)const#
inlineat::Tensor&gt_(constat::Tensor&other)const#
inlineat::Tensorgreater(constat::Scalar&other)const#
inlineat::Tensorgreater(constat::Tensor&other)const#
inlineat::Tensor&greater_(constat::Scalar&other)const#
inlineat::Tensor&greater_(constat::Tensor&other)const#
inlineat::Tensorlt(constat::Scalar&other)const#
inlineat::Tensorlt(constat::Tensor&other)const#
inlineat::Tensor&lt_(constat::Scalar&other)const#
inlineat::Tensor&lt_(constat::Tensor&other)const#
inlineat::Tensorless(constat::Scalar&other)const#
inlineat::Tensorless(constat::Tensor&other)const#
inlineat::Tensor&less_(constat::Scalar&other)const#
inlineat::Tensor&less_(constat::Tensor&other)const#
inlineat::Tensortake(constat::Tensor&index)const#
inlineat::Tensortake_along_dim(constat::Tensor&indices,::std::optional<int64_t>dim=::std::nullopt)const#
inlineat::Tensorindex_select(int64_tdim,constat::Tensor&index)const#
inlineat::Tensorindex_select(at::Dimnamedim,constat::Tensor&index)const#
inlineat::Tensormasked_select(constat::Tensor&mask)const#
inlineat::Tensornonzero()const#
inlineat::Tensornonzero_static(int64_tsize,int64_tfill_value=-1)const#
inlineat::Tensornonzero_static_symint(c10::SymIntsize,int64_tfill_value=-1)const#
inline::std::vector<at::Tensor>nonzero_numpy()const#
inlineat::Tensorargwhere()const#
inlineat::Tensorgather(int64_tdim,constat::Tensor&index,boolsparse_grad=false)const#
inlineat::Tensorgather(at::Dimnamedim,constat::Tensor&index,boolsparse_grad=false)const#
inlineat::Tensoraddcmul(constat::Tensor&tensor1,constat::Tensor&tensor2,constat::Scalar&value=1)const#
inlineat::Tensor&addcmul_(constat::Tensor&tensor1,constat::Tensor&tensor2,constat::Scalar&value=1)const#
inlineat::Tensoraddcdiv(constat::Tensor&tensor1,constat::Tensor&tensor2,constat::Scalar&value=1)const#
inlineat::Tensor&addcdiv_(constat::Tensor&tensor1,constat::Tensor&tensor2,constat::Scalar&value=1)const#
inline::std::tuple<at::Tensor,at::Tensor>triangular_solve(constat::Tensor&A,boolupper=true,booltranspose=false,boolunitriangular=false)const#
inline::std::tuple<at::Tensor,at::Tensor,at::Tensor>svd(boolsome=true,boolcompute_uv=true)const#
inlineat::Tensorswapaxes(int64_taxis0,int64_taxis1)const#
inlineat::Tensor&swapaxes_(int64_taxis0,int64_taxis1)const#
inlineat::Tensorswapdims(int64_tdim0,int64_tdim1)const#
inlineat::Tensor&swapdims_(int64_tdim0,int64_tdim1)const#
inlineat::Tensorcholesky(boolupper=false)const#
inlineat::Tensorcholesky_solve(constat::Tensor&input2,boolupper=false)const#
inlineat::Tensorcholesky_inverse(boolupper=false)const#
inline::std::tuple<at::Tensor,at::Tensor>qr(boolsome=true)const#
inline::std::tuple<at::Tensor,at::Tensor>geqrf()const#
inlineat::Tensororgqr(constat::Tensor&input2)const#
inlineat::Tensorormqr(constat::Tensor&input2,constat::Tensor&input3,boolleft=true,booltranspose=false)const#
inlineat::Tensorlu_solve(constat::Tensor&LU_data,constat::Tensor&LU_pivots)const#
inlineat::Tensormultinomial(int64_tnum_samples,boolreplacement=false,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensormultinomial_symint(c10::SymIntnum_samples,boolreplacement=false,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensor&lgamma_()const#
inlineat::Tensorlgamma()const#
inlineat::Tensordigamma()const#
inlineat::Tensorpolygamma(int64_tn)const#
inlineat::Tensor&polygamma_(int64_tn)const#
inlineat::Tensorerfinv()const#
inlineat::Tensor&erfinv_()const#
inlineat::Tensori0()const#
inlineat::Tensor&i0_()const#
inlineat::Tensorsign()const#
inlineat::Tensor&sign_()const#
inlineat::Tensorsignbit()const#
inlineat::Tensordist(constat::Tensor&other,constat::Scalar&p=2)const#
inlineat::Tensor&atan2_(constat::Tensor&other)const#
inlineat::Tensoratan2(constat::Tensor&other)const#
inlineat::Tensorarctan2(constat::Tensor&other)const#
inlineat::Tensor&arctan2_(constat::Tensor&other)const#
inlineat::Tensorlerp(constat::Tensor&end,constat::Scalar&weight)const#
inlineat::Tensorlerp(constat::Tensor&end,constat::Tensor&weight)const#
inlineat::Tensorhistc(int64_tbins=100,constat::Scalar&min=0,constat::Scalar&max=0)const#
inline::std::tuple<at::Tensor,at::Tensor>histogram(constat::Tensor&bins,const::std::optional<at::Tensor>&weight={},booldensity=false)const#
inline::std::tuple<at::Tensor,at::Tensor>histogram(int64_tbins=100,::std::optional<at::ArrayRef<double>>range=::std::nullopt,const::std::optional<at::Tensor>&weight={},booldensity=false)const#
inlineat::Tensorfmod(constat::Scalar&other)const#
inlineat::Tensor&fmod_(constat::Scalar&other)const#
inlineat::Tensorfmod(constat::Tensor&other)const#
inlineat::Tensor&fmod_(constat::Tensor&other)const#
inlineat::Tensorhypot(constat::Tensor&other)const#
inlineat::Tensor&hypot_(constat::Tensor&other)const#
inlineat::Tensorigamma(constat::Tensor&other)const#
inlineat::Tensor&igamma_(constat::Tensor&other)const#
inlineat::Tensorigammac(constat::Tensor&other)const#
inlineat::Tensor&igammac_(constat::Tensor&other)const#
inlineat::Tensornextafter(constat::Tensor&other)const#
inlineat::Tensor&nextafter_(constat::Tensor&other)const#
inlineat::Tensorremainder(constat::Scalar&other)const#
inlineat::Tensor&remainder_(constat::Scalar&other)const#
inlineat::Tensorremainder(constat::Tensor&other)const#
inlineat::Tensor&remainder_(constat::Tensor&other)const#
inlineat::Tensormin()const#
inlineat::Tensorfmin(constat::Tensor&other)const#
inlineat::Tensormax()const#
inlineat::Tensorfmax(constat::Tensor&other)const#
inlineat::Tensormaximum(constat::Tensor&other)const#
inlineat::Tensormax(constat::Tensor&other)const#
inlineat::Tensorminimum(constat::Tensor&other)const#
inlineat::Tensormin(constat::Tensor&other)const#
inlineat::Tensorquantile(constat::Tensor&q,::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false,c10::string_viewinterpolation="linear")const#
inlineat::Tensorquantile(doubleq,::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false,c10::string_viewinterpolation="linear")const#
inlineat::Tensornanquantile(constat::Tensor&q,::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false,c10::string_viewinterpolation="linear")const#
inlineat::Tensornanquantile(doubleq,::std::optional<int64_t>dim=::std::nullopt,boolkeepdim=false,c10::string_viewinterpolation="linear")const#
inline::std::tuple<at::Tensor,at::Tensor>sort(int64_tdim=-1,booldescending=false)const#
inline::std::tuple<at::Tensor,at::Tensor>sort(::std::optional<bool>stable,int64_tdim=-1,booldescending=false)const#
inline::std::tuple<at::Tensor,at::Tensor>sort(at::Dimnamedim,booldescending=false)const#
inline::std::tuple<at::Tensor,at::Tensor>sort(::std::optional<bool>stable,at::Dimnamedim,booldescending=false)const#
inlineat::Tensormsort()const#
inlineat::Tensorargsort(int64_tdim=-1,booldescending=false)const#
inlineat::Tensorargsort(boolstable,int64_tdim=-1,booldescending=false)const#
inlineat::Tensorargsort(at::Dimnamedim,booldescending=false)const#
inline::std::tuple<at::Tensor,at::Tensor>topk(int64_tk,int64_tdim=-1,boollargest=true,boolsorted=true)const#
inline::std::tuple<at::Tensor,at::Tensor>topk_symint(c10::SymIntk,int64_tdim=-1,boollargest=true,boolsorted=true)const#
inlineat::Tensorall()const#
inlineat::Tensorany()const#
inlineat::Tensorrenorm(constat::Scalar&p,int64_tdim,constat::Scalar&maxnorm)const#
inlineat::Tensor&renorm_(constat::Scalar&p,int64_tdim,constat::Scalar&maxnorm)const#
inlineat::Tensorunfold(int64_tdimension,int64_tsize,int64_tstep)const#
inlineboolequal(constat::Tensor&other)const#
inlineat::Tensorpow(constat::Tensor&exponent)const#
inlineat::Tensorpow(constat::Scalar&exponent)const#
inlineat::Tensor&pow_(constat::Scalar&exponent)const#
inlineat::Tensor&pow_(constat::Tensor&exponent)const#
inlineat::Tensorfloat_power(constat::Tensor&exponent)const#
inlineat::Tensorfloat_power(constat::Scalar&exponent)const#
inlineat::Tensor&float_power_(constat::Scalar&exponent)const#
inlineat::Tensor&float_power_(constat::Tensor&exponent)const#
inlineat::Tensor&normal_(doublemean=0,doublestd=1,::std::optional<at::Generator>generator=::std::nullopt)const#
inlineat::Tensoralias()const#
inlineat::Tensorisfinite()const#
inlineat::Tensorisinf()const#
inlinevoidrecord_stream(at::Streams)const#
inlineat::Tensorisposinf()const#
inlineat::Tensorisneginf()const#
inlineat::Tensordet()const#
inline::std::tuple<at::Tensor,at::Tensor>slogdet()const#
inlineat::Tensorlogdet()const#
inlineat::Tensorinverse()const#
inlineat::Tensorinner(constat::Tensor&other)const#
inlineat::Tensorouter(constat::Tensor&vec2)const#
inlineat::Tensorger(constat::Tensor&vec2)const#
inlineat::Tensorto_padded_tensor(doublepadding,at::OptionalIntArrayRefoutput_size=::std::nullopt)const#
inlineat::Tensorto_padded_tensor_symint(doublepadding,at::OptionalSymIntArrayRefoutput_size=::std::nullopt)const#
inlineTensorvar(intdim)const#
inlineTensorstd(intdim)const#
inlineTensorto(caffe2::TypeMetatype_meta,boolnon_blocking=false,boolcopy=false)const#
inlineTensorto(Devicedevice,caffe2::TypeMetatype_meta,boolnon_blocking=false,boolcopy=false)const#
template<typenameF,typename...Args>
inlinedecltype(auto)m(Ffunc,Args&&...params)const#
inlineat::Tensortensor_data()const#

NOTE: This is similar to the legacy.data() function onVariable, and is intended to be used from functions that need to access theVariable’s equivalentTensor (i.e.

Tensor that shares the same storage and tensor metadata with theVariable).

One notable difference with the legacy.data() function is that changes to the returnedTensor’s tensor metadata (e.g. sizes / strides / storage / storage_offset) will not update the originalVariable, due to the fact that this function shallow-copies theVariable’s underlying TensorImpl.

inlineat::Tensorvariable_data()const#

NOTE:var.variable_data() in C++ has the same semantics astensor.data in Python, which create a newVariable that shares the same storage and tensor metadata with the originalVariable, but with a completely new autograd history.

NOTE: If we change the tensor metadata (e.g. sizes / strides / storage / storage_offset) of a variable created fromvar.variable_data(), those changes will not update the original variablevar. In.variable_data(), we setallow_tensor_metadata_change_ to false to make such changes explicitly illegal, in order to prevent users from changing metadata ofvar.variable_data() and expecting the original variablevar to also be updated.

template<typenameT>
hook_return_void_t<T>register_hook(T&&hook)const#

Registers a backward hook.

The hook will be called every time a gradient with respect to theTensor is computed. The hook should have one of the following signature:

hook(Tensorgrad)->Tensor
hook(Tensorgrad)->void
The hook should not modify its argument, but it can optionally return a new gradient which will be used in place ofgrad.

This function returns the index of the hook in the list which can be used to remove hook.

Example:

autov=torch::tensor({0.,0.,0.},torch::requires_grad());autoh=v.register_hook([](torch::Tensorgrad){returngrad*2;});// double the gradientv.backward(torch::tensor({1.,2.,3.}));// This prints:// ```//  2//  4//  6// [ CPUFloatType{3} ]// ```std::cout<<v.grad()<<std::endl;v.remove_hook(h);// removes the hook

template<typenameT>
hook_return_var_t<T>register_hook(T&&hook)const#
inlineTensordata()const#
void_backward(TensorListinputs,conststd::optional<Tensor>&gradient,std::optional<bool>keep_graph,boolcreate_graph)const#
inlineconstTensor&requires_grad_(bool_requires_grad=true)const#
template<typenameT>
autoregister_hook(T&&hook)const->Tensor::hook_return_void_t<T>#

Public Members

N
PtrTraits

Public Static Functions

staticinlineTensorwrap_tensor_impl(c10::intrusive_ptr<TensorImpl,UndefinedTensorImpl>tensor_impl)#

Protected Functions

inlineexplicitTensor(unsafe_borrow_t,constTensorBase&rhs)#

Protected Attributes

friendMaybeOwnedTraits<Tensor>
friendOptionalTensorRef
friendTensorRef
On this page