Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Protected Attributes
at::Type Struct Referenceabstract

Public Member Functions

 Type (TensorTypeId type_id, bool is_variable, bool is_undefined)
 
virtual ScalarType scalarType () const =0
 
virtual caffe2::TypeMeta typeMeta () const =0
 
virtual Backend backend () const =0
 
Layout layout () const noexcept
 
virtual bool is_cuda () const =0
 
virtual bool is_hip () const =0
 
virtual bool is_sparse () const =0
 
virtual bool is_distributed () const =0
 
bool is_variable () const noexcept
 
bool is_undefined () const noexcept
 
virtual Allocatorallocator () const =0
 
virtual Device getDeviceFromPtr (void *data) const =0
 
virtual Storage storageFromBlob (void *data, int64_t size, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Storage storageWithAllocator (int64_t size, Allocator *allocator) const =0
 
virtual std::unique_ptr< Generatorgenerator () const =0
 
virtual Tensor unsafeTensorFromTH (void *th_pointer, bool retain) const =0
 
virtual Storage unsafeStorageFromTH (void *th_pointer, bool retain) const =0
 
virtual const char * toString () const =0
 
virtual TypetoBackend (Backend b) const =0
 
virtual TypetoScalarType (ScalarType s) const =0
 
TypetoSparse () const
 
TypetoDense () const
 
Typecpu () const
 
Typecuda () const
 
Typehip () const
 
virtual TypeID ID () const =0
 
TensorTypeId type_id () const
 
DeviceType device_type () const
 
virtual Tensor copy (const Tensor &src, bool non_blocking=false, c10::optional< Device > to_device={}) const =0
 
virtual Tensorcopy_ (Tensor &self, const Tensor &src, bool non_blocking=false) const =0
 
virtual void backward (Tensor &self, c10::optional< Tensor > gradient, bool keep_graph, bool create_graph) const =0
 
virtual void set_data (Tensor &self, Tensor new_data) const =0
 
virtual Tensor tensorFromBlob (void *data, IntArrayRef sizes, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Tensor tensorFromBlob (void *data, IntArrayRef sizes, IntArrayRef strides, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Tensor tensorWithAllocator (IntArrayRef sizes, Allocator *allocator) const =0
 
virtual Tensor tensorWithAllocator (IntArrayRef sizes, IntArrayRef strides, Allocator *allocator) const =0
 
bool operator== (const Type &other) const
 
bool operator!= (const Type &other) const
 
TensorOptions options (int16_t device_index=-1) const
 Constructs the TensorOptions from a type and a device_index.
 
TensorOptions options (c10::optional< Device > device_opt) const
 Constructs the TensorOptions from a type and a Device. More...
 
 operator TensorOptions () const
 
virtual Tensor abs (const Tensor &self) const =0
 
virtual Tensorabs_ (Tensor &self) const =0
 
virtual Tensor acos (const Tensor &self) const =0
 
virtual Tensoracos_ (Tensor &self) const =0
 
virtual Tensor add (const Tensor &self, const Tensor &other, Scalar alpha) const =0
 
virtual Tensoradd_ (Tensor &self, const Tensor &other, Scalar alpha) const =0
 
virtual Tensor add (const Tensor &self, Scalar other, Scalar alpha) const =0
 
virtual Tensoradd_ (Tensor &self, Scalar other, Scalar alpha) const =0
 
virtual Tensor addmv (const Tensor &self, const Tensor &mat, const Tensor &vec, Scalar beta, Scalar alpha) const =0
 
virtual Tensoraddmv_ (Tensor &self, const Tensor &mat, const Tensor &vec, Scalar beta, Scalar alpha) const =0
 
virtual Tensor addr (const Tensor &self, const Tensor &vec1, const Tensor &vec2, Scalar beta, Scalar alpha) const =0
 
virtual Tensoraddr_ (Tensor &self, const Tensor &vec1, const Tensor &vec2, Scalar beta, Scalar alpha) const =0
 
virtual Tensor all (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual bool allclose (const Tensor &self, const Tensor &other, double rtol, double atol, bool equal_nan) const =0
 
virtual Tensor any (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual Tensor argmax (const Tensor &self, c10::optional< int64_t > dim, bool keepdim) const =0
 
virtual Tensor argmin (const Tensor &self, c10::optional< int64_t > dim, bool keepdim) const =0
 
virtual Tensor as_strided (const Tensor &self, IntArrayRef size, IntArrayRef stride, c10::optional< int64_t > storage_offset) const =0
 
virtual Tensoras_strided_ (Tensor &self, IntArrayRef size, IntArrayRef stride, c10::optional< int64_t > storage_offset) const =0
 
virtual Tensor asin (const Tensor &self) const =0
 
virtual Tensorasin_ (Tensor &self) const =0
 
virtual Tensor atan (const Tensor &self) const =0
 
virtual Tensoratan_ (Tensor &self) const =0
 
virtual Tensor baddbmm (const Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) const =0
 
virtual Tensorbaddbmm_ (Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) const =0
 
virtual Tensor bernoulli (const Tensor &self, Generator *generator) const =0
 
virtual Tensorbernoulli_ (Tensor &self, const Tensor &p, Generator *generator) const =0
 
virtual Tensorbernoulli_ (Tensor &self, double p, Generator *generator) const =0
 
virtual Tensor bernoulli (const Tensor &self, double p, Generator *generator) const =0
 
virtual Tensor bincount (const Tensor &self, const Tensor &weights, int64_t minlength) const =0
 
virtual Tensor bmm (const Tensor &self, const Tensor &mat2) const =0
 
virtual Tensor ceil (const Tensor &self) const =0
 
virtual Tensorceil_ (Tensor &self) const =0
 
virtual std::vector< Tensorchunk (const Tensor &self, int64_t chunks, int64_t dim) const =0
 
virtual Tensor clamp (const Tensor &self, c10::optional< Scalar > min, c10::optional< Scalar > max) const =0
 
virtual Tensorclamp_ (Tensor &self, c10::optional< Scalar > min, c10::optional< Scalar > max) const =0
 
virtual Tensor clamp_max (const Tensor &self, Scalar max) const =0
 
virtual Tensorclamp_max_ (Tensor &self, Scalar max) const =0
 
virtual Tensor clamp_min (const Tensor &self, Scalar min) const =0
 
virtual Tensorclamp_min_ (Tensor &self, Scalar min) const =0
 
virtual Tensor contiguous (const Tensor &self) const =0
 
virtual Tensor cos (const Tensor &self) const =0
 
virtual Tensorcos_ (Tensor &self) const =0
 
virtual Tensor cosh (const Tensor &self) const =0
 
virtual Tensorcosh_ (Tensor &self) const =0
 
virtual Tensor cumsum (const Tensor &self, int64_t dim, ScalarType dtype) const =0
 
virtual Tensor cumsum (const Tensor &self, int64_t dim) const =0
 
virtual Tensor cumprod (const Tensor &self, int64_t dim, ScalarType dtype) const =0
 
virtual Tensor cumprod (const Tensor &self, int64_t dim) const =0
 
virtual Tensor det (const Tensor &self) const =0
 
virtual Tensor diag_embed (const Tensor &self, int64_t offset, int64_t dim1, int64_t dim2) const =0
 
virtual Tensor diagflat (const Tensor &self, int64_t offset) const =0
 
virtual Tensor diagonal (const Tensor &self, int64_t offset, int64_t dim1, int64_t dim2) const =0
 
virtual Tensor div (const Tensor &self, const Tensor &other) const =0
 
virtual Tensordiv_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor div (const Tensor &self, Scalar other) const =0
 
virtual Tensordiv_ (Tensor &self, Scalar other) const =0
 
virtual Tensor dot (const Tensor &self, const Tensor &tensor) const =0
 
virtual Tensorresize_ (Tensor &self, IntArrayRef size) const =0
 
virtual Tensor erf (const Tensor &self) const =0
 
virtual Tensorerf_ (Tensor &self) const =0
 
virtual Tensor erfc (const Tensor &self) const =0
 
virtual Tensorerfc_ (Tensor &self) const =0
 
virtual Tensor exp (const Tensor &self) const =0
 
virtual Tensorexp_ (Tensor &self) const =0
 
virtual Tensor expm1 (const Tensor &self) const =0
 
virtual Tensorexpm1_ (Tensor &self) const =0
 
virtual Tensor expand (const Tensor &self, IntArrayRef size, bool implicit) const =0
 
virtual Tensor expand_as (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor flatten (const Tensor &self, int64_t start_dim, int64_t end_dim) const =0
 
virtual Tensorfill_ (Tensor &self, Scalar value) const =0
 
virtual Tensorfill_ (Tensor &self, const Tensor &value) const =0
 
virtual Tensor floor (const Tensor &self) const =0
 
virtual Tensorfloor_ (Tensor &self) const =0
 
virtual Tensor ger (const Tensor &self, const Tensor &vec2) const =0
 
virtual Tensor fft (const Tensor &self, int64_t signal_ndim, bool normalized) const =0
 
virtual Tensor ifft (const Tensor &self, int64_t signal_ndim, bool normalized) const =0
 
virtual Tensor rfft (const Tensor &self, int64_t signal_ndim, bool normalized, bool onesided) const =0
 
virtual Tensor irfft (const Tensor &self, int64_t signal_ndim, bool normalized, bool onesided, IntArrayRef signal_sizes) const =0
 
virtual Tensor index (const Tensor &self, TensorList indices) const =0
 
virtual Tensorindex_copy_ (Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) const =0
 
virtual Tensor index_copy (const Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) const =0
 
virtual Tensorindex_put_ (Tensor &self, TensorList indices, const Tensor &values, bool accumulate) const =0
 
virtual Tensor index_put (const Tensor &self, TensorList indices, const Tensor &values, bool accumulate) const =0
 
virtual Tensor inverse (const Tensor &self) const =0
 
virtual Tensor isclose (const Tensor &self, const Tensor &other, double rtol, double atol, bool equal_nan) const =0
 
virtual bool is_distributed (const Tensor &self) const =0
 
virtual bool is_floating_point (const Tensor &self) const =0
 
virtual bool is_complex (const Tensor &self) const =0
 
virtual bool is_nonzero (const Tensor &self) const =0
 
virtual bool is_same_size (const Tensor &self, const Tensor &other) const =0
 
virtual bool is_signed (const Tensor &self) const =0
 
virtual std::tuple< Tensor, Tensorkthvalue (const Tensor &self, int64_t k, int64_t dim, bool keepdim) const =0
 
virtual Tensor log (const Tensor &self) const =0
 
virtual Tensorlog_ (Tensor &self) const =0
 
virtual Tensor log10 (const Tensor &self) const =0
 
virtual Tensorlog10_ (Tensor &self) const =0
 
virtual Tensor log1p (const Tensor &self) const =0
 
virtual Tensorlog1p_ (Tensor &self) const =0
 
virtual Tensor log2 (const Tensor &self) const =0
 
virtual Tensorlog2_ (Tensor &self) const =0
 
virtual Tensor logdet (const Tensor &self) const =0
 
virtual Tensor log_softmax (const Tensor &self, int64_t dim, ScalarType dtype) const =0
 
virtual Tensor log_softmax (const Tensor &self, int64_t dim) const =0
 
virtual Tensor logsumexp (const Tensor &self, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor matmul (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor matrix_power (const Tensor &self, int64_t n) const =0
 
virtual std::tuple< Tensor, Tensormax (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual Tensor max_values (const Tensor &self, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor mean (const Tensor &self, ScalarType dtype) const =0
 
virtual Tensor mean (const Tensor &self) const =0
 
virtual Tensor mean (const Tensor &self, IntArrayRef dim, bool keepdim, ScalarType dtype) const =0
 
virtual Tensor mean (const Tensor &self, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor mean (const Tensor &self, IntArrayRef dim, ScalarType dtype) const =0
 
virtual std::tuple< Tensor, Tensormedian (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual std::tuple< Tensor, Tensormin (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual Tensor min_values (const Tensor &self, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor mm (const Tensor &self, const Tensor &mat2) const =0
 
virtual std::tuple< Tensor, Tensormode (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual Tensor mul (const Tensor &self, const Tensor &other) const =0
 
virtual Tensormul_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor mul (const Tensor &self, Scalar other) const =0
 
virtual Tensormul_ (Tensor &self, Scalar other) const =0
 
virtual Tensor mv (const Tensor &self, const Tensor &vec) const =0
 
virtual Tensor mvlgamma (const Tensor &self, int64_t p) const =0
 
virtual Tensormvlgamma_ (Tensor &self, int64_t p) const =0
 
virtual Tensor narrow_copy (const Tensor &self, int64_t dim, int64_t start, int64_t length) const =0
 
virtual Tensor narrow (const Tensor &self, int64_t dim, int64_t start, int64_t length) const =0
 
virtual Tensor permute (const Tensor &self, IntArrayRef dims) const =0
 
virtual Tensor pin_memory (const Tensor &self) const =0
 
virtual Tensor pinverse (const Tensor &self, double rcond) const =0
 
virtual Tensor repeat (const Tensor &self, IntArrayRef repeats) const =0
 
virtual Tensor reshape (const Tensor &self, IntArrayRef shape) const =0
 
virtual Tensor reshape_as (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor round (const Tensor &self) const =0
 
virtual Tensorround_ (Tensor &self) const =0
 
virtual Tensor relu (const Tensor &self) const =0
 
virtual Tensorrelu_ (Tensor &self) const =0
 
virtual Tensor prelu (const Tensor &self, const Tensor &weight) const =0
 
virtual std::tuple< Tensor, Tensorprelu_backward (const Tensor &grad_output, const Tensor &self, const Tensor &weight) const =0
 
virtual Tensor hardshrink (const Tensor &self, Scalar lambd) const =0
 
virtual Tensor hardshrink_backward (const Tensor &grad_out, const Tensor &self, Scalar lambd) const =0
 
virtual Tensor rsqrt (const Tensor &self) const =0
 
virtual Tensorrsqrt_ (Tensor &self) const =0
 
virtual Tensor select (const Tensor &self, int64_t dim, int64_t index) const =0
 
virtual Tensor sigmoid (const Tensor &self) const =0
 
virtual Tensorsigmoid_ (Tensor &self) const =0
 
virtual Tensor sin (const Tensor &self) const =0
 
virtual Tensorsin_ (Tensor &self) const =0
 
virtual Tensor sinh (const Tensor &self) const =0
 
virtual Tensorsinh_ (Tensor &self) const =0
 
virtual Tensor detach (const Tensor &self) const =0
 
virtual Tensordetach_ (Tensor &self) const =0
 
virtual int64_t size (const Tensor &self, int64_t dim) const =0
 
virtual Tensor slice (const Tensor &self, int64_t dim, int64_t start, int64_t end, int64_t step) const =0
 
virtual std::tuple< Tensor, Tensorslogdet (const Tensor &self) const =0
 
virtual Tensor smm (const Tensor &self, const Tensor &mat2) const =0
 
virtual Tensor softmax (const Tensor &self, int64_t dim, ScalarType dtype) const =0
 
virtual Tensor softmax (const Tensor &self, int64_t dim) const =0
 
virtual std::vector< Tensorsplit (const Tensor &self, int64_t split_size, int64_t dim) const =0
 
virtual std::vector< Tensorsplit_with_sizes (const Tensor &self, IntArrayRef split_sizes, int64_t dim) const =0
 
virtual Tensor squeeze (const Tensor &self) const =0
 
virtual Tensor squeeze (const Tensor &self, int64_t dim) const =0
 
virtual Tensorsqueeze_ (Tensor &self) const =0
 
virtual Tensorsqueeze_ (Tensor &self, int64_t dim) const =0
 
virtual Tensor sspaddmm (const Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) const =0
 
virtual Tensor stft (const Tensor &self, int64_t n_fft, c10::optional< int64_t > hop_length, c10::optional< int64_t > win_length, const Tensor &window, bool normalized, bool onesided) const =0
 
virtual int64_t stride (const Tensor &self, int64_t dim) const =0
 
virtual Tensor sum (const Tensor &self, ScalarType dtype) const =0
 
virtual Tensor sum (const Tensor &self) const =0
 
virtual Tensor sum (const Tensor &self, IntArrayRef dim, bool keepdim, ScalarType dtype) const =0
 
virtual Tensor sum (const Tensor &self, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor sum (const Tensor &self, IntArrayRef dim, ScalarType dtype) const =0
 
virtual Tensor sum_to_size (const Tensor &self, IntArrayRef size) const =0
 
virtual Tensor sqrt (const Tensor &self) const =0
 
virtual Tensorsqrt_ (Tensor &self) const =0
 
virtual Tensor std (const Tensor &self, bool unbiased) const =0
 
virtual Tensor std (const Tensor &self, IntArrayRef dim, bool unbiased, bool keepdim) const =0
 
virtual Tensor prod (const Tensor &self, ScalarType dtype) const =0
 
virtual Tensor prod (const Tensor &self) const =0
 
virtual Tensor prod (const Tensor &self, int64_t dim, bool keepdim, ScalarType dtype) const =0
 
virtual Tensor prod (const Tensor &self, int64_t dim, bool keepdim) const =0
 
virtual Tensor prod (const Tensor &self, int64_t dim, ScalarType dtype) const =0
 
virtual Tensor t (const Tensor &self) const =0
 
virtual Tensort_ (Tensor &self) const =0
 
virtual Tensor tan (const Tensor &self) const =0
 
virtual Tensortan_ (Tensor &self) const =0
 
virtual Tensor tanh (const Tensor &self) const =0
 
virtual Tensortanh_ (Tensor &self) const =0
 
virtual Tensor transpose (const Tensor &self, int64_t dim0, int64_t dim1) const =0
 
virtual Tensortranspose_ (Tensor &self, int64_t dim0, int64_t dim1) const =0
 
virtual Tensor flip (const Tensor &self, IntArrayRef dims) const =0
 
virtual Tensor roll (const Tensor &self, IntArrayRef shifts, IntArrayRef dims) const =0
 
virtual Tensor rot90 (const Tensor &self, int64_t k, IntArrayRef dims) const =0
 
virtual Tensor trunc (const Tensor &self) const =0
 
virtual Tensortrunc_ (Tensor &self) const =0
 
virtual Tensor type_as (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor unsqueeze (const Tensor &self, int64_t dim) const =0
 
virtual Tensorunsqueeze_ (Tensor &self, int64_t dim) const =0
 
virtual Tensor var (const Tensor &self, bool unbiased) const =0
 
virtual Tensor var (const Tensor &self, IntArrayRef dim, bool unbiased, bool keepdim) const =0
 
virtual Tensor view_as (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor where (const Tensor &condition, const Tensor &self, const Tensor &other) const =0
 
virtual Tensor norm (const Tensor &self, c10::optional< Scalar > p, ScalarType dtype) const =0
 
virtual Tensor norm (const Tensor &self, Scalar p) const =0
 
virtual Tensor norm (const Tensor &self, c10::optional< Scalar > p, IntArrayRef dim, bool keepdim, ScalarType dtype) const =0
 
virtual Tensor norm (const Tensor &self, c10::optional< Scalar > p, IntArrayRef dim, bool keepdim) const =0
 
virtual Tensor clone (const Tensor &self) const =0
 
virtual Tensorresize_as_ (Tensor &self, const Tensor &the_template) const =0
 
virtual Tensor pow (const Tensor &self, Scalar exponent) const =0
 
virtual Tensorzero_ (Tensor &self) const =0
 
virtual Tensor sub (const Tensor &self, const Tensor &other, Scalar alpha) const =0
 
virtual Tensorsub_ (Tensor &self, const Tensor &other, Scalar alpha) const =0
 
virtual Tensor sub (const Tensor &self, Scalar other, Scalar alpha) const =0
 
virtual Tensorsub_ (Tensor &self, Scalar other, Scalar alpha) const =0
 
virtual Tensor addmm (const Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) const =0
 
virtual Tensoraddmm_ (Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) const =0
 
virtual Tensorsparse_resize_ (Tensor &self, IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) const =0
 
virtual Tensorsparse_resize_and_clear_ (Tensor &self, IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) const =0
 
virtual Tensor sparse_mask (const Tensor &self, SparseTensorRef mask) const =0
 
virtual Tensor to_dense (const Tensor &self) const =0
 
virtual int64_t sparse_dim (const Tensor &self) const =0
 
virtual int64_t _dimI (const Tensor &self) const =0
 
virtual int64_t dense_dim (const Tensor &self) const =0
 
virtual int64_t _dimV (const Tensor &self) const =0
 
virtual int64_t _nnz (const Tensor &self) const =0
 
virtual Tensor coalesce (const Tensor &self) const =0
 
virtual bool is_coalesced (const Tensor &self) const =0
 
virtual Tensor _indices (const Tensor &self) const =0
 
virtual Tensor _values (const Tensor &self) const =0
 
virtual Tensor_coalesced_ (Tensor &self, bool coalesced) const =0
 
virtual Tensor indices (const Tensor &self) const =0
 
virtual Tensor values (const Tensor &self) const =0
 
virtual int64_t numel (const Tensor &self) const =0
 
virtual std::vector< Tensorunbind (const Tensor &self, int64_t dim) const =0
 
virtual Tensor to_sparse (const Tensor &self, int64_t sparse_dim) const =0
 
virtual Tensor to_sparse (const Tensor &self) const =0
 
virtual Tensor to (const Tensor &self, const TensorOptions &options, bool non_blocking, bool copy) const =0
 
virtual Tensor to (const Tensor &self, Device device, ScalarType dtype, bool non_blocking, bool copy) const =0
 
virtual Tensor to (const Tensor &self, ScalarType dtype, bool non_blocking, bool copy) const =0
 
virtual Tensor to (const Tensor &self, const Tensor &other, bool non_blocking, bool copy) const =0
 
virtual Scalar item (const Tensor &self) const =0
 
virtual void * data_ptr (const Tensor &self) const =0
 
virtual Tensorset_ (Tensor &self, Storage source) const =0
 
virtual Tensorset_ (Tensor &self, Storage source, int64_t storage_offset, IntArrayRef size, IntArrayRef stride) const =0
 
virtual Tensorset_ (Tensor &self, const Tensor &source) const =0
 
virtual Tensorset_ (Tensor &self) const =0
 
virtual bool is_set_to (const Tensor &self, const Tensor &tensor) const =0
 
virtual Tensormasked_fill_ (Tensor &self, const Tensor &mask, Scalar value) const =0
 
virtual Tensor masked_fill (const Tensor &self, const Tensor &mask, Scalar value) const =0
 
virtual Tensormasked_fill_ (Tensor &self, const Tensor &mask, const Tensor &value) const =0
 
virtual Tensor masked_fill (const Tensor &self, const Tensor &mask, const Tensor &value) const =0
 
virtual Tensormasked_scatter_ (Tensor &self, const Tensor &mask, const Tensor &source) const =0
 
virtual Tensor masked_scatter (const Tensor &self, const Tensor &mask, const Tensor &source) const =0
 
virtual Tensor view (const Tensor &self, IntArrayRef size) const =0
 
virtual Tensorput_ (Tensor &self, const Tensor &index, const Tensor &source, bool accumulate) const =0
 
virtual Tensorindex_add_ (Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) const =0
 
virtual Tensor index_add (const Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) const =0
 
virtual Tensorindex_fill_ (Tensor &self, int64_t dim, const Tensor &index, Scalar value) const =0
 
virtual Tensor index_fill (const Tensor &self, int64_t dim, const Tensor &index, Scalar value) const =0
 
virtual Tensorindex_fill_ (Tensor &self, int64_t dim, const Tensor &index, const Tensor &value) const =0
 
virtual Tensor index_fill (const Tensor &self, int64_t dim, const Tensor &index, const Tensor &value) const =0
 
virtual Tensorscatter_ (Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) const =0
 
virtual Tensor scatter (const Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) const =0
 
virtual Tensorscatter_ (Tensor &self, int64_t dim, const Tensor &index, Scalar value) const =0
 
virtual Tensor scatter (const Tensor &self, int64_t dim, const Tensor &index, Scalar value) const =0
 
virtual Tensorscatter_add_ (Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) const =0
 
virtual Tensor scatter_add (const Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) const =0
 
virtual Tensorlt_ (Tensor &self, Scalar other) const =0
 
virtual Tensorlt_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorgt_ (Tensor &self, Scalar other) const =0
 
virtual Tensorgt_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorle_ (Tensor &self, Scalar other) const =0
 
virtual Tensorle_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorge_ (Tensor &self, Scalar other) const =0
 
virtual Tensorge_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensoreq_ (Tensor &self, Scalar other) const =0
 
virtual Tensoreq_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorne_ (Tensor &self, Scalar other) const =0
 
virtual Tensorne_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor __and__ (const Tensor &self, Scalar other) const =0
 
virtual Tensor __and__ (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor__iand__ (Tensor &self, Scalar other) const =0
 
virtual Tensor__iand__ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor __or__ (const Tensor &self, Scalar other) const =0
 
virtual Tensor __or__ (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor__ior__ (Tensor &self, Scalar other) const =0
 
virtual Tensor__ior__ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor __xor__ (const Tensor &self, Scalar other) const =0
 
virtual Tensor __xor__ (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor__ixor__ (Tensor &self, Scalar other) const =0
 
virtual Tensor__ixor__ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor __lshift__ (const Tensor &self, Scalar other) const =0
 
virtual Tensor __lshift__ (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor__ilshift__ (Tensor &self, Scalar other) const =0
 
virtual Tensor__ilshift__ (Tensor &self, const Tensor &other) const =0
 
virtual Tensor __rshift__ (const Tensor &self, Scalar other) const =0
 
virtual Tensor __rshift__ (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor__irshift__ (Tensor &self, Scalar other) const =0
 
virtual Tensor__irshift__ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorlgamma_ (Tensor &self) const =0
 
virtual Tensoratan2_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensortril_ (Tensor &self, int64_t diagonal) const =0
 
virtual Tensortriu_ (Tensor &self, int64_t diagonal) const =0
 
virtual Tensordigamma_ (Tensor &self) const =0
 
virtual Tensorpolygamma_ (Tensor &self, int64_t n) const =0
 
virtual Tensorerfinv_ (Tensor &self) const =0
 
virtual Tensorfrac_ (Tensor &self) const =0
 
virtual Tensorrenorm_ (Tensor &self, Scalar p, int64_t dim, Scalar maxnorm) const =0
 
virtual Tensorreciprocal_ (Tensor &self) const =0
 
virtual Tensorneg_ (Tensor &self) const =0
 
virtual Tensorpow_ (Tensor &self, Scalar exponent) const =0
 
virtual Tensorpow_ (Tensor &self, const Tensor &exponent) const =0
 
virtual Tensorlerp_ (Tensor &self, const Tensor &end, Scalar weight) const =0
 
virtual Tensorlerp_ (Tensor &self, const Tensor &end, const Tensor &weight) const =0
 
virtual Tensorsign_ (Tensor &self) const =0
 
virtual Tensorfmod_ (Tensor &self, Scalar other) const =0
 
virtual Tensorfmod_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensorremainder_ (Tensor &self, Scalar other) const =0
 
virtual Tensorremainder_ (Tensor &self, const Tensor &other) const =0
 
virtual Tensoraddbmm_ (Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) const =0
 
virtual Tensor addbmm (const Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) const =0
 
virtual Tensoraddcmul_ (Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) const =0
 
virtual Tensoraddcdiv_ (Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) const =0
 
virtual Tensorrandom_ (Tensor &self, int64_t from, int64_t to, Generator *generator) const =0
 
virtual Tensorrandom_ (Tensor &self, int64_t to, Generator *generator) const =0
 
virtual Tensorrandom_ (Tensor &self, Generator *generator) const =0
 
virtual Tensoruniform_ (Tensor &self, double from, double to, Generator *generator) const =0
 
virtual Tensornormal_ (Tensor &self, double mean, double std, Generator *generator) const =0
 
virtual Tensorcauchy_ (Tensor &self, double median, double sigma, Generator *generator) const =0
 
virtual Tensorlog_normal_ (Tensor &self, double mean, double std, Generator *generator) const =0
 
virtual Tensorexponential_ (Tensor &self, double lambd, Generator *generator) const =0
 
virtual Tensorgeometric_ (Tensor &self, double p, Generator *generator) const =0
 
virtual Tensor diag (const Tensor &self, int64_t diagonal) const =0
 
virtual Tensor cross (const Tensor &self, const Tensor &other, int64_t dim) const =0
 
virtual Tensor triu (const Tensor &self, int64_t diagonal) const =0
 
virtual Tensor tril (const Tensor &self, int64_t diagonal) const =0
 
virtual Tensor trace (const Tensor &self) const =0
 
virtual Tensor ne (const Tensor &self, Scalar other) const =0
 
virtual Tensor ne (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor eq (const Tensor &self, Scalar other) const =0
 
virtual Tensor eq (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor ge (const Tensor &self, Scalar other) const =0
 
virtual Tensor ge (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor le (const Tensor &self, Scalar other) const =0
 
virtual Tensor le (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor gt (const Tensor &self, Scalar other) const =0
 
virtual Tensor gt (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor lt (const Tensor &self, Scalar other) const =0
 
virtual Tensor lt (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor take (const Tensor &self, const Tensor &index) const =0
 
virtual Tensor index_select (const Tensor &self, int64_t dim, const Tensor &index) const =0
 
virtual Tensor masked_select (const Tensor &self, const Tensor &mask) const =0
 
virtual Tensor nonzero (const Tensor &self) const =0
 
virtual Tensor gather (const Tensor &self, int64_t dim, const Tensor &index, bool sparse_grad) const =0
 
virtual Tensor addcmul (const Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) const =0
 
virtual Tensor addcdiv (const Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) const =0
 
virtual std::tuple< Tensor, Tensorgels (const Tensor &self, const Tensor &A) const =0
 
virtual std::tuple< Tensor, Tensortrtrs (const Tensor &self, const Tensor &A, bool upper, bool transpose, bool unitriangular) const =0
 
virtual std::tuple< Tensor, Tensorsymeig (const Tensor &self, bool eigenvectors, bool upper) const =0
 
virtual std::tuple< Tensor, Tensoreig (const Tensor &self, bool eigenvectors) const =0
 
virtual std::tuple< Tensor, Tensor, Tensorsvd (const Tensor &self, bool some, bool compute_uv) const =0
 
virtual Tensor cholesky (const Tensor &self, bool upper) const =0
 
virtual Tensor cholesky_solve (const Tensor &self, const Tensor &input2, bool upper) const =0
 
virtual std::tuple< Tensor, Tensorsolve (const Tensor &self, const Tensor &A) const =0
 
virtual Tensor potri (const Tensor &self, bool upper) const =0
 
virtual std::tuple< Tensor, Tensorpstrf (const Tensor &self, bool upper, Scalar tol) const =0
 
virtual std::tuple< Tensor, Tensorqr (const Tensor &self) const =0
 
virtual std::tuple< Tensor, Tensorgeqrf (const Tensor &self) const =0
 
virtual Tensor orgqr (const Tensor &self, const Tensor &input2) const =0
 
virtual Tensor ormqr (const Tensor &self, const Tensor &input2, const Tensor &input3, bool left, bool transpose) const =0
 
virtual std::tuple< Tensor, Tensorbtrifact (const Tensor &self, bool pivot) const =0
 
virtual std::tuple< Tensor, Tensor, Tensorbtrifact_with_info (const Tensor &self, bool pivot) const =0
 
virtual Tensor btrisolve (const Tensor &self, const Tensor &LU_data, const Tensor &LU_pivots) const =0
 
virtual Tensor multinomial (const Tensor &self, int64_t num_samples, bool replacement, Generator *generator) const =0
 
virtual Tensor lgamma (const Tensor &self) const =0
 
virtual Tensor digamma (const Tensor &self) const =0
 
virtual Tensor polygamma (int64_t n, const Tensor &self) const =0
 
virtual Tensor erfinv (const Tensor &self) const =0
 
virtual Tensor frac (const Tensor &self) const =0
 
virtual Tensor dist (const Tensor &self, const Tensor &other, Scalar p) const =0
 
virtual Tensor reciprocal (const Tensor &self) const =0
 
virtual Tensor neg (const Tensor &self) const =0
 
virtual Tensor atan2 (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor lerp (const Tensor &self, const Tensor &end, Scalar weight) const =0
 
virtual Tensor lerp (const Tensor &self, const Tensor &end, const Tensor &weight) const =0
 
virtual Tensor histc (const Tensor &self, int64_t bins, Scalar min, Scalar max) const =0
 
virtual Tensor sign (const Tensor &self) const =0
 
virtual Tensor fmod (const Tensor &self, Scalar other) const =0
 
virtual Tensor fmod (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor remainder (const Tensor &self, Scalar other) const =0
 
virtual Tensor remainder (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor min (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor min (const Tensor &self) const =0
 
virtual Tensor max (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor max (const Tensor &self) const =0
 
virtual Tensor median (const Tensor &self) const =0
 
virtual std::tuple< Tensor, Tensorsort (const Tensor &self, int64_t dim, bool descending) const =0
 
virtual Tensor argsort (const Tensor &self, int64_t dim, bool descending) const =0
 
virtual std::tuple< Tensor, Tensortopk (const Tensor &self, int64_t k, int64_t dim, bool largest, bool sorted) const =0
 
virtual Tensor all (const Tensor &self) const =0
 
virtual Tensor any (const Tensor &self) const =0
 
virtual Tensor renorm (const Tensor &self, Scalar p, int64_t dim, Scalar maxnorm) const =0
 
virtual Tensor unfold (const Tensor &self, int64_t dimension, int64_t size, int64_t step) const =0
 
virtual bool equal (const Tensor &self, const Tensor &other) const =0
 
virtual Tensor pow (const Tensor &self, const Tensor &exponent) const =0
 
virtual Tensor pow (Scalar self, const Tensor &exponent) const =0
 
virtual Tensor alias (const Tensor &self) const =0
 
 Type (TensorTypeId type_id, bool is_variable, bool is_undefined)
 
virtual ScalarType scalarType () const =0
 
virtual caffe2::TypeMeta typeMeta () const =0
 
virtual Backend backend () const =0
 
Layout layout () const noexcept
 
virtual bool is_cuda () const =0
 
virtual bool is_hip () const =0
 
virtual bool is_sparse () const =0
 
virtual bool is_distributed () const =0
 
bool is_variable () const noexcept
 
bool is_undefined () const noexcept
 
virtual Allocatorallocator () const =0
 
virtual Device getDeviceFromPtr (void *data) const =0
 
virtual Storage storageFromBlob (void *data, int64_t size, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Storage storageWithAllocator (int64_t size, Allocator *allocator) const =0
 
virtual std::unique_ptr< Generatorgenerator () const =0
 
virtual Tensor unsafeTensorFromTH (void *th_pointer, bool retain) const =0
 
virtual Storage unsafeStorageFromTH (void *th_pointer, bool retain) const =0
 
virtual const char * toString () const =0
 
virtual TypetoBackend (Backend b) const =0
 
virtual TypetoScalarType (ScalarType s) const =0
 
TypetoSparse () const
 
TypetoDense () const
 
Typecpu () const
 
Typecuda () const
 
Typehip () const
 
virtual TypeID ID () const =0
 
TensorTypeId type_id () const
 
DeviceType device_type () const
 
virtual Tensor copy (const Tensor &src, bool non_blocking=false, c10::optional< Device > to_device={}) const =0
 
virtual Tensorcopy_ (Tensor &self, const Tensor &src, bool non_blocking=false) const =0
 
virtual void backward (Tensor &self, c10::optional< Tensor > gradient, bool keep_graph, bool create_graph) const =0
 
virtual void set_data (Tensor &self, Tensor new_data) const =0
 
virtual Tensor tensorFromBlob (void *data, IntArrayRef sizes, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Tensor tensorFromBlob (void *data, IntArrayRef sizes, IntArrayRef strides, const std::function< void(void *)> &deleter=noop_deleter) const =0
 
virtual Tensor tensorWithAllocator (IntArrayRef sizes, Allocator *allocator) const =0
 
virtual Tensor tensorWithAllocator (IntArrayRef sizes, IntArrayRef strides, Allocator *allocator) const =0
 
bool operator== (const Type &other) const
 
bool operator!= (const Type &other) const
 
TensorOptions options (int16_t device_index=-1) const
 Constructs the TensorOptions from a type and a device_index.
 
TensorOptions options (c10::optional< Device > device_opt) const
 Constructs the TensorOptions from a type and a Device. More...
 
 operator TensorOptions () const
 

Protected Attributes

TensorTypeId type_id_
 
bool is_variable_
 
bool is_undefined_
 

Detailed Description

Definition at line 107 of file Type.h.

Member Function Documentation

TensorOptions at::Type::options ( c10::optional< Device device_opt) const
inline

Constructs the TensorOptions from a type and a Device.

Asserts that the device type matches the device type of the type.

Definition at line 143 of file Type.h.

TensorOptions at::Type::options ( c10::optional< Device device_opt) const
inline

Constructs the TensorOptions from a type and a Device.

Asserts that the device type matches the device type of the type.

Definition at line 194 of file Type.h.

Field Documentation

bool at::Type::is_variable_
protected
Initial value:
{pure_virtual_type_method_declarations}
protected:
TensorTypeId type_id_

Definition at line 620 of file Type.h.


The documentation for this struct was generated from the following file: