/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/TensorBody.h (247555B)
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace c10{
template class List;
}
namespace at {
struct Generator;
struct Type;
class DeprecatedTypeProperties;
class Tensor;
} // namespace at
namespace at {
namespace indexing {
struct TensorIndex;
} // namespace indexing
} // namespace at
namespace torch { namespace autograd {
struct Node;
}} // namespace torch::autograd
namespace at {
class OptionalTensorRef;
class Tensor;
using TensorList = ArrayRef;
using Stream = c10::Stream;
// Tensor is a "generic" object holding a pointer to the underlying TensorImpl object, which
// has an embedded reference count. In this way, Tensor is similar to boost::intrusive_ptr.
//
// For example:
//
// void func(Tensor a) {
// Tensor b = a;
// ...
// }
//
// In this example, when we say Tensor b = a, we are creating a new object that points to the
// same underlying TensorImpl, and bumps its reference count. When b goes out of scope, the
// destructor decrements the reference count by calling release() on the TensorImpl it points to.
// The existing constructors, operator overloads, etc. take care to implement the correct semantics.
//
// Note that Tensor can also be NULL, i.e. it is not associated with any underlying TensorImpl, and
// special care must be taken to handle this.
class TORCH_API Tensor: public TensorBase {
protected:
// Create a Tensor with a +0 reference count. Special care must be
// taken to avoid decrementing this reference count at destruction
// time. Intended to support MaybeOwnedTraits.
explicit Tensor(unsafe_borrow_t, const TensorBase& rhs): TensorBase(unsafe_borrow_t{}, rhs) {}
friend MaybeOwnedTraits;
friend OptionalTensorRef;
public:
Tensor() = default;
// This constructor should not be used by end users and is an implementation
// detail invoked by autogenerated code.
explicit Tensor(
c10::intrusive_ptr tensor_impl)
: TensorBase(std::move(tensor_impl)) {}
Tensor(const Tensor &tensor) = default;
Tensor(Tensor &&tensor) = default;
// Implicitly move-constructible from TensorBase, but must be explicit to increase refcount
explicit Tensor(const TensorBase &base): TensorBase(base) {}
/*implicit*/ Tensor(TensorBase &&base): TensorBase(std::move(base)) {}
// Creates a new wrapper from TensorImpl. Intentionally a free method because
// it should be used with care. Checks necessary invariants
static Tensor wrap_tensor_impl(
c10::intrusive_ptr tensor_impl) {
return TensorBase::wrap_tensor_impl(std::move(tensor_impl));
}
Tensor contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) const {
return TensorBase::contiguous(memory_format);
}
Tensor conj() const {
if (!this->is_complex()) {
return *this;
} else {
if (this->is_sparse()) {
return this->conj_physical();
}
return this->_conj();
}
}
// Aliased by Dimname overloads, so need explicit using
using TensorBase::size;
using TensorBase::stride;
/// 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 expect_contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) const &;
// Use .contiguous() instead. Trying to borrow from a prvalue Tensor
// will only lead to trouble and dangling references.
c10::MaybeOwned expect_contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) && = delete;
// The following overloads are very intruiging. Consider the following
// program:
//
// x[1] = 3;
//
// We would expect that the first entry of x is written to 3. But how can we
// actually achieve this? x[1] evaluates to a tensor...
//
// The answer is, using a ref-qualifier. x[1] is an rvalue, which cannot be
// (profitably) assigned to in the traditional sense, so we overload
// assignment to mean, "Actually, copy 3 into the tensor data." This is done
// with an rvalue-reference ref-qualified overload (the methods with && at the
// end of their type.)
//
// There's one more fly in the ointment: We also want
//
// Tensor x = y;
//
// to work, and we want it NOT to copy. So we need a traditional operator=
// overload. But we MUST specify a mutable lvalue ref-qualifier, to
// disambiguate the traditional overload from the rvalue-reference
// ref-qualified overload. Otherwise, it will be ambiguous, because
// a non ref-qualified method is eligible for all situations.
// Unfortunately, we have to write these constructors out manually
// to work around an MSVC bug:
// error C2580: 'at::Tensor &at::Tensor::operator =(const at::Tensor &) &':
// multiple versions of a defaulted special member functions are not allowed
// Tensor& operator=(const Tensor&) & = default;
// Tensor& operator=(Tensor&&) & = default;
// Also MSVC will wrongly issue the following warning with the aforementioned fix
// warning C4522: 'at::Tensor': multiple assignment operators specified
// Let's just skip the warning.
//
// TODO: temporarily disabled
Tensor& operator=(const TensorBase& x) & {
impl_ = x.getIntrusivePtr();
return *this;
}
Tensor& operator=(TensorBase&& x) & {
impl_ = x.unsafeReleaseIntrusivePtr();
return *this;
}
Tensor& operator=(const Tensor &x) & {
return operator=(static_cast(x));
}
Tensor& operator=(Tensor &&x) & {
return operator=(static_cast(x));
}
Tensor& operator=(Scalar v) &&;
Tensor& operator=(const Tensor&) &&;
Tensor& operator=(Tensor&&) &&;
C10_DEPRECATED_MESSAGE("Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device().")
DeprecatedTypeProperties & type() const {
return globalDeprecatedTypePropertiesRegistry().getDeprecatedTypeProperties(
dispatchKeyToBackend(legacyExtractDispatchKey(key_set())),
scalar_type());
}
Tensor toType(ScalarType t) const {
return to(options().dtype(t), /*non_blocking*/ false, /*copy*/ false);
}
// TODO: Deprecate me
Tensor toBackend(Backend b) const {
return to(options().device(backendToDeviceType(b)).layout(layout_from_backend(b)), /*non_blocking*/ false, /*copy*/ false);
}
C10_DEPRECATED_MESSAGE("Tensor.is_variable() is deprecated; everything is a variable now. (If you want to assert that variable has been appropriately handled already, use at::impl::variable_excluded_from_dispatch())")
bool is_variable() const noexcept {
return !at::impl::variable_excluded_from_dispatch();
}
template
C10_DEPRECATED_MESSAGE("Tensor.data() is deprecated. Please use Tensor.data_ptr() instead.")
T * data() const {
return data_ptr();
}
template
T item() const;
// Purposely not defined here to avoid inlining
void print() const;
template class PtrTraits = DefaultPtrTraits, typename index_t = int64_t>
C10_DEPRECATED_MESSAGE("packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead")
GenericPackedTensorAccessor packed_accessor() const & {
return generic_packed_accessor();
}
template class PtrTraits = DefaultPtrTraits, typename index_t = int64_t>
C10_DEPRECATED_MESSAGE("packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead")
GenericPackedTensorAccessor packed_accessor() && = delete;
Tensor operator~() const;
Tensor operator-() const;
Tensor& operator+=(const Tensor & other);
Tensor& operator+=(Scalar other);
Tensor& operator-=(const Tensor & other);
Tensor& operator-=(Scalar other);
Tensor& operator*=(const Tensor & other);
Tensor& operator*=(Scalar other);
Tensor& operator/=(const Tensor & other);
Tensor& operator/=(Scalar other);
Tensor& operator&=(const Tensor & other);
Tensor& operator|=(const Tensor & other);
Tensor& operator^=(const Tensor & other);
Tensor operator[](Scalar index) const;
Tensor operator[](Tensor index) const;
Tensor operator[](int64_t index) const;
Tensor index(ArrayRef indices) const;
Tensor index(std::initializer_list indices) const;
Tensor & index_put_(ArrayRef indices, Tensor const & rhs);
Tensor & index_put_(ArrayRef indices, const Scalar& v);
Tensor & index_put_(std::initializer_list indices, Tensor const & rhs);
Tensor & index_put_(std::initializer_list indices, const Scalar& v);
Tensor cpu() const {
return to(options().device(DeviceType::CPU), /*non_blocking*/ false, /*copy*/ false);
}
// TODO: The Python version also accepts arguments
Tensor cuda() const {
return to(options().device(DeviceType::CUDA), /*non_blocking*/ false, /*copy*/ false);
}
Tensor hip() const {
return to(options().device(DeviceType::HIP), /*non_blocking*/ false, /*copy*/ false);
}
Tensor ve() const {
return to(options().device(DeviceType::VE), /*non_blocking*/ false, /*copy*/ false);
}
Tensor vulkan() const {
return to(options().device(DeviceType::Vulkan), /*non_blocking*/ false, /*copy*/ false);
}
Tensor metal() const {
return to(options().device(DeviceType::Metal), /*non_blocking*/ false, /*copy*/ false);
}
// ~~~~~ Autograd API ~~~~~
/// \fn bool is_leaf() const;
///
/// All Tensors that have `requires_grad()` which is ``false`` will be leaf Tensors by convention.
///
/// For Tensors that have `requires_grad()` which is ``true``, they will be leaf Tensors if they were
/// created by the user. This means that they are not the result of an operation and so
/// `grad_fn()` is `nullptr`.
///
/// Only leaf Tensors will have their `grad()` populated during a call to `backward()`.
/// To get `grad()` populated for non-leaf Tensors, you can use `retain_grad()`.
///
/// Example:
/// @code
/// auto a = torch::rand(10, torch::requires_grad());
/// std::cout << a.is_leaf() << std::endl; // prints `true`
///
/// auto b = torch::rand(10, torch::requires_grad()).to(torch::kCUDA);
/// std::cout << b.is_leaf() << std::endl; // prints `false`
/// // b was created by the operation that cast a cpu Tensor into a cuda Tensor
///
/// auto c = torch::rand(10, torch::requires_grad()) + 2;
/// std::cout << c.is_leaf() << std::endl; // prints `false`
/// // c was created by the addition operation
///
/// auto d = torch::rand(10).cuda();
/// std::cout << d.is_leaf() << std::endl; // prints `true`
/// // d does not require gradients and so has no operation creating it (that is tracked by the autograd engine)
///
/// auto e = torch::rand(10).cuda().requires_grad_();
/// std::cout << e.is_leaf() << std::endl; // prints `true`
/// // e requires gradients and has no operations creating it
///
/// auto f = torch::rand(10, torch::device(torch::kCUDA).requires_grad(true));
/// std::cout << f.is_leaf() << std::endl; // prints `true`
/// // f requires grad, has no operation creating it
/// @endcode
/// \fn void backward(const Tensor & gradient={}, c10::optional retain_graph=c10::nullopt, bool create_graph=false, c10::optional inputs=c10::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 specifying ``gradient``.
/// It should be a tensor of matching type and location, that contains
/// the gradient of the differentiated function w.r.t. this Tensor.
///
/// This function accumulates gradients in the leaves - you might need to
/// zero them before calling it.
///
/// \param gradient Gradient w.r.t. the
/// tensor. If it is a tensor, it will be automatically converted
/// to a Tensor that does not require grad unless ``create_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.
/// \param retain_graph If ``false``, 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 of
/// ``create_graph``.
/// \param create_graph If ``true``, graph of the derivative will
/// be constructed, allowing to compute higher order derivative
/// products. Defaults to ``false``.
/// \param inputs Inputs w.r.t. which the gradient will be accumulated into
/// ``at::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.
/// See https://github.com/pytorch/pytorch/pull/60521#issuecomment-867061780 for more details.
void backward(const Tensor & gradient={}, c10::optional retain_graph=c10::nullopt, bool create_graph=false, c10::optional inputs=c10::nullopt) const {
// NB: Adding this wrapper to _backward here because we'd like our
// 'backwards' api to accept the 'inputs' argument optionally. Since code gen
// currently does not support optional of TensorList our approach is to replace
// backward in native_functions.yaml with _backward and call it here instead.
if (inputs.has_value()) {
TORCH_CHECK(inputs.value().size() > 0, "'inputs' argument to backward cannot be empty")
this->_backward(inputs.value(), gradient, retain_graph, create_graph);
} else {
this->_backward({}, gradient, retain_graph, create_graph);
}
}
/// \fn Tensor detach() const;
///
/// Returns a new Tensor, detached from the current graph.
/// The result will never require gradient.
/// \fn Tensor & detach_() const;
///
/// Detaches the Tensor from the graph that created it, making it a leaf.
/// Views cannot be detached in-place.
/// \fn void retain_grad() const;
///
/// Enables this Tensor to have their :attr:`grad` populated during
/// :func:`backward`. This is a no-op for leaf tensors.
/// \fn bool retains_grad() const;
///
/// Is ``true`` if this Tensor is non-leaf and its :attr:`grad` is enabled to be
/// populated during :func:`backward`, ``false`` otherwise.
const Tensor& set_requires_grad(bool requires_grad) const {
TensorBase::set_requires_grad(requires_grad);
return *this;
}
/// Return a mutable reference to the gradient. This is conventionally
/// used as `t.grad() = x` to set a gradient to a completely new tensor.
/// Note that this function work with a non-const Tensor and is not
/// thread safe.
Tensor& mutable_grad() const {
return impl_->mutable_grad();
}
/// This function returns an undefined tensor by default and returns a defined tensor
/// the first time a call to `backward()` computes gradients for this Tensor.
/// The attribute will then contain the gradients computed and future calls
/// to `backward()` will accumulate (add) gradients into it.
const Tensor& grad() const {
const Tensor& maybe_grad = impl_->grad();
if (!is_leaf() && !retains_grad() && !maybe_grad.defined()) {
TORCH_WARN(
"The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad "
"attribute won't be populated during autograd.backward(). If you indeed want the .grad "
"field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. "
"If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor "
"instead. See github.com/pytorch/pytorch/pull/30531 for more informations.");
}
return maybe_grad;
}
// The Forward AD API functions below are low level and are not to be used by end
// users who should use the API provided in torch/csrc/autograd.h
/// This function returns the forward gradient for this Tensor at the given level.
const Tensor& _fw_grad(uint64_t level) const {
return impl_->_fw_grad(level, *this);
}
/// 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 this Tensor. In that case,
/// new_grad content will be copied into a new Tensor
void _set_fw_grad(const TensorBase& new_grad, uint64_t level, bool is_inplace_op) const {
impl_->_set_fw_grad(new_grad, *this, level, is_inplace_op);
}
// STOP. Thinking of adding a method here, which only makes use
// of other ATen methods? Define it in native_functions.yaml.
//example
//Tensor * add(Tensor & b);
void __dispatch__backward(at::TensorList inputs, const c10::optional & gradient={}, c10::optional retain_graph=c10::nullopt, bool create_graph=false) const;
void __dispatch_set_data(const at::Tensor & new_data) const;
at::Tensor __dispatch_data() const;
bool __dispatch_is_leaf() const;
int64_t __dispatch_output_nr() const;
int64_t __dispatch__version() const;
at::Tensor & __dispatch_requires_grad_(bool requires_grad=true) const;
void __dispatch_retain_grad() const;
bool __dispatch_retains_grad() const;
at::Tensor _fw_primal(int64_t level) const;
at::Tensor & rename_(c10::optional names) const;
at::Tensor rename(c10::optional names) const;
at::Tensor align_to(at::DimnameList names) const;
at::Tensor align_to(at::DimnameList order, int64_t ellipsis_idx) const;
at::Tensor align_as(const at::Tensor & other) const;
at::Tensor refine_names(at::DimnameList names) const;
at::Tensor abs() const;
at::Tensor & abs_() const;
at::Tensor absolute() const;
at::Tensor & absolute_() const;
at::Tensor angle() const;
at::Tensor sgn() const;
at::Tensor & sgn_() const;
at::Tensor _conj() const;
at::Tensor __dispatch_conj() const;
at::Tensor _conj_physical() const;
at::Tensor conj_physical() const;
at::Tensor & conj_physical_() const;
at::Tensor resolve_conj() const;
at::Tensor resolve_neg() const;
at::Tensor _neg_view() const;
at::Tensor acos() const;
at::Tensor & acos_() const;
at::Tensor arccos() const;
at::Tensor & arccos_() const;
at::Tensor add(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor & add_(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor add(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor & add_(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor addmv(const at::Tensor & mat, const at::Tensor & vec, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor & addmv_(const at::Tensor & mat, const at::Tensor & vec, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor addr(const at::Tensor & vec1, const at::Tensor & vec2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor & addr_(const at::Tensor & vec1, const at::Tensor & vec2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor all(int64_t dim, bool keepdim=false) const;
at::Tensor all(at::Dimname dim, bool keepdim=false) const;
bool allclose(const at::Tensor & other, double rtol=1e-05, double atol=1e-08, bool equal_nan=false) const;
at::Tensor any(int64_t dim, bool keepdim=false) const;
at::Tensor any(at::Dimname dim, bool keepdim=false) const;
at::Tensor argmax(c10::optional dim=c10::nullopt, bool keepdim=false) const;
at::Tensor argmin(c10::optional dim=c10::nullopt, bool keepdim=false) const;
at::Tensor acosh() const;
at::Tensor & acosh_() const;
at::Tensor arccosh() const;
at::Tensor & arccosh_() const;
at::Tensor asinh() const;
at::Tensor & asinh_() const;
at::Tensor arcsinh() const;
at::Tensor & arcsinh_() const;
at::Tensor atanh() const;
at::Tensor & atanh_() const;
at::Tensor arctanh() const;
at::Tensor & arctanh_() const;
at::Tensor as_strided(at::IntArrayRef size, at::IntArrayRef stride, c10::optional storage_offset=c10::nullopt) const;
const at::Tensor & as_strided_(at::IntArrayRef size, at::IntArrayRef stride, c10::optional storage_offset=c10::nullopt) const;
at::Tensor asin() const;
at::Tensor & asin_() const;
at::Tensor arcsin() const;
at::Tensor & arcsin_() const;
at::Tensor atan() const;
at::Tensor & atan_() const;
at::Tensor arctan() const;
at::Tensor & arctan_() const;
at::Tensor baddbmm(const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor & baddbmm_(const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor bernoulli(c10::optional generator=c10::nullopt) const;
at::Tensor & bernoulli_(const at::Tensor & p, c10::optional generator=c10::nullopt) const;
at::Tensor & bernoulli_(double p=0.5, c10::optional generator=c10::nullopt) const;
at::Tensor bernoulli(double p, c10::optional generator=c10::nullopt) const;
at::Tensor bincount(const c10::optional & weights={}, int64_t minlength=0) const;
at::Tensor bitwise_not() const;
at::Tensor & bitwise_not_() const;
at::Tensor copysign(const at::Tensor & other) const;
at::Tensor & copysign_(const at::Tensor & other) const;
at::Tensor copysign(const at::Scalar & other) const;
at::Tensor & copysign_(const at::Scalar & other) const;
at::Tensor logical_not() const;
at::Tensor & logical_not_() const;
at::Tensor logical_xor(const at::Tensor & other) const;
at::Tensor & logical_xor_(const at::Tensor & other) const;
at::Tensor logical_and(const at::Tensor & other) const;
at::Tensor & logical_and_(const at::Tensor & other) const;
at::Tensor logical_or(const at::Tensor & other) const;
at::Tensor & logical_or_(const at::Tensor & other) const;
at::Tensor bmm(const at::Tensor & mat2) const;
at::Tensor broadcast_to(at::IntArrayRef size) const;
at::Tensor ceil() const;
at::Tensor & ceil_() const;
::std::vector unsafe_chunk(int64_t chunks, int64_t dim=0) const;
::std::vector chunk(int64_t chunks, int64_t dim=0) const;
::std::vector tensor_split(int64_t sections, int64_t dim=0) const;
::std::vector tensor_split(at::IntArrayRef indices, int64_t dim=0) const;
::std::vector tensor_split(const at::Tensor & tensor_indices_or_sections, int64_t dim=0) const;
at::Tensor clamp(const c10::optional & min, const c10::optional & max=c10::nullopt) const;
at::Tensor clamp(const c10::optional & min={}, const c10::optional & max={}) const;
at::Tensor & clamp_(const c10::optional & min, const c10::optional & max=c10::nullopt) const;
at::Tensor & clamp_(const c10::optional & min={}, const c10::optional & max={}) const;
at::Tensor clamp_max(const at::Scalar & max) const;
at::Tensor clamp_max(const at::Tensor & max) const;
at::Tensor & clamp_max_(const at::Scalar & max) const;
at::Tensor & clamp_max_(const at::Tensor & max) const;
at::Tensor clamp_min(const at::Scalar & min) const;
at::Tensor clamp_min(const at::Tensor & min) const;
at::Tensor & clamp_min_(const at::Scalar & min) const;
at::Tensor & clamp_min_(const at::Tensor & min) const;
at::Tensor clip(const c10::optional & min, const c10::optional & max=c10::nullopt) const;
at::Tensor clip(const c10::optional & min={}, const c10::optional & max={}) const;
at::Tensor & clip_(const c10::optional & min, const c10::optional & max=c10::nullopt) const;
at::Tensor & clip_(const c10::optional & min={}, const c10::optional & max={}) const;
at::Tensor __dispatch_contiguous(at::MemoryFormat memory_format=MemoryFormat::Contiguous) const;
at::Tensor & copy_(const at::Tensor & src, bool non_blocking=false) const;
at::Tensor cos() const;
at::Tensor & cos_() const;
at::Tensor cosh() const;
at::Tensor & cosh_() const;
at::Tensor count_nonzero(at::IntArrayRef dim) const;
at::Tensor count_nonzero(c10::optional dim=c10::nullopt) const;
at::Tensor cov(int64_t correction=1, const c10::optional & fweights={}, const c10::optional & aweights={}) const;
at::Tensor corrcoef() const;
::std::tuple cummax(int64_t dim) const;
::std::tuple cummax(at::Dimname dim) const;
::std::tuple cummin(int64_t dim) const;
::std::tuple cummin(at::Dimname dim) const;
at::Tensor cumprod(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor & cumprod_(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor cumprod(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
at::Tensor & cumprod_(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
at::Tensor cumsum(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor & cumsum_(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor cumsum(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
at::Tensor & cumsum_(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
at::Tensor diag_embed(int64_t offset=0, int64_t dim1=-2, int64_t dim2=-1) const;
at::Tensor diagflat(int64_t offset=0) const;
at::Tensor diagonal(int64_t offset=0, int64_t dim1=0, int64_t dim2=1) const;
at::Tensor diagonal(at::Dimname outdim, at::Dimname dim1, at::Dimname dim2, int64_t offset=0) const;
at::Tensor & fill_diagonal_(const at::Scalar & fill_value, bool wrap=false) const;
at::Tensor diff(int64_t n=1, int64_t dim=-1, const c10::optional & prepend={}, const c10::optional & append={}) const;
at::Tensor div(const at::Tensor & other) const;
at::Tensor & div_(const at::Tensor & other) const;
at::Tensor div(const at::Tensor & other, c10::optional rounding_mode) const;
at::Tensor & div_(const at::Tensor & other, c10::optional rounding_mode) const;
at::Tensor div(const at::Scalar & other) const;
at::Tensor & div_(const at::Scalar & other) const;
at::Tensor div(const at::Scalar & other, c10::optional rounding_mode) const;
at::Tensor & div_(const at::Scalar & other, c10::optional rounding_mode) const;
at::Tensor divide(const at::Tensor & other) const;
at::Tensor & divide_(const at::Tensor & other) const;
at::Tensor divide(const at::Scalar & other) const;
at::Tensor & divide_(const at::Scalar & other) const;
at::Tensor divide(const at::Tensor & other, c10::optional rounding_mode) const;
at::Tensor & divide_(const at::Tensor & other, c10::optional rounding_mode) const;
at::Tensor divide(const at::Scalar & other, c10::optional rounding_mode) const;
at::Tensor & divide_(const at::Scalar & other, c10::optional rounding_mode) const;
at::Tensor true_divide(const at::Tensor & other) const;
at::Tensor & true_divide_(const at::Tensor & other) const;
at::Tensor true_divide(const at::Scalar & other) const;
at::Tensor & true_divide_(const at::Scalar & other) const;
at::Tensor dot(const at::Tensor & tensor) const;
at::Tensor vdot(const at::Tensor & other) const;
at::Tensor new_empty(at::IntArrayRef size, at::TensorOptions options={}) const;
at::Tensor new_empty(at::IntArrayRef size, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) const;
at::Tensor new_empty_strided(at::IntArrayRef size, at::IntArrayRef stride, at::TensorOptions options={}) const;
at::Tensor new_empty_strided(at::IntArrayRef size, at::IntArrayRef stride, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) const;
at::Tensor new_full(at::IntArrayRef size, const at::Scalar & fill_value, at::TensorOptions options={}) const;
at::Tensor new_full(at::IntArrayRef size, const at::Scalar & fill_value, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) const;
at::Tensor new_zeros(at::IntArrayRef size, at::TensorOptions options={}) const;
at::Tensor new_zeros(at::IntArrayRef size, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) const;
at::Tensor new_ones(at::IntArrayRef size, at::TensorOptions options={}) const;
at::Tensor new_ones(at::IntArrayRef size, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) const;
const at::Tensor & resize_(at::IntArrayRef size, c10::optional memory_format=c10::nullopt) const;
at::Tensor erf() const;
at::Tensor & erf_() const;
at::Tensor erfc() const;
at::Tensor & erfc_() const;
at::Tensor exp() const;
at::Tensor & exp_() const;
at::Tensor exp2() const;
at::Tensor & exp2_() const;
at::Tensor expm1() const;
at::Tensor & expm1_() const;
at::Tensor expand(at::IntArrayRef size, bool implicit=false) const;
at::Tensor expand_as(const at::Tensor & other) const;
at::Tensor flatten(int64_t start_dim=0, int64_t end_dim=-1) const;
at::Tensor flatten(int64_t start_dim, int64_t end_dim, at::Dimname out_dim) const;
at::Tensor flatten(at::Dimname start_dim, at::Dimname end_dim, at::Dimname out_dim) const;
at::Tensor flatten(at::DimnameList dims, at::Dimname out_dim) const;
at::Tensor unflatten(int64_t dim, at::IntArrayRef sizes, c10::optional names=c10::nullopt) const;
at::Tensor unflatten(at::Dimname dim, at::IntArrayRef sizes, at::DimnameList names) const;
at::Tensor & fill_(const at::Scalar & value) const;
at::Tensor & fill_(const at::Tensor & value) const;
at::Tensor floor() const;
at::Tensor & floor_() const;
at::Tensor floor_divide(const at::Tensor & other) const;
at::Tensor & floor_divide_(const at::Tensor & other) const;
at::Tensor floor_divide(const at::Scalar & other) const;
at::Tensor & floor_divide_(const at::Scalar & other) const;
at::Tensor frac() const;
at::Tensor & frac_() const;
at::Tensor gcd(const at::Tensor & other) const;
at::Tensor & gcd_(const at::Tensor & other) const;
at::Tensor lcm(const at::Tensor & other) const;
at::Tensor & lcm_(const at::Tensor & other) const;
at::Tensor index(const c10::List> & indices) const;
at::Tensor & index_copy_(int64_t dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor index_copy(int64_t dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor & index_copy_(at::Dimname dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor index_copy(at::Dimname dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor & index_put_(const c10::List> & indices, const at::Tensor & values, bool accumulate=false) const;
at::Tensor index_put(const c10::List> & indices, const at::Tensor & values, bool accumulate=false) const;
at::Tensor inverse() const;
at::Tensor isclose(const at::Tensor & other, double rtol=1e-05, double atol=1e-08, bool equal_nan=false) const;
at::Tensor isnan() const;
bool is_distributed() const;
bool __dispatch_is_floating_point() const;
bool __dispatch_is_complex() const;
bool __dispatch_is_conj() const;
bool __dispatch_is_neg() const;
at::Tensor isreal() const;
bool is_nonzero() const;
bool is_same_size(const at::Tensor & other) const;
bool __dispatch_is_signed() const;
bool __dispatch_is_inference() const;
at::Tensor kron(const at::Tensor & other) const;
::std::tuple kthvalue(int64_t k, int64_t dim=-1, bool keepdim=false) const;
::std::tuple kthvalue(int64_t k, at::Dimname dim, bool keepdim=false) const;
at::Tensor nan_to_num(c10::optional nan=c10::nullopt, c10::optional posinf=c10::nullopt, c10::optional neginf=c10::nullopt) const;
at::Tensor & nan_to_num_(c10::optional nan=c10::nullopt, c10::optional posinf=c10::nullopt, c10::optional neginf=c10::nullopt) const;
at::Tensor ldexp(const at::Tensor & other) const;
at::Tensor & ldexp_(const at::Tensor & other) const;
at::Tensor log() const;
at::Tensor & log_() const;
at::Tensor log10() const;
at::Tensor & log10_() const;
at::Tensor log1p() const;
at::Tensor & log1p_() const;
at::Tensor log2() const;
at::Tensor & log2_() const;
at::Tensor logaddexp(const at::Tensor & other) const;
at::Tensor logaddexp2(const at::Tensor & other) const;
at::Tensor xlogy(const at::Tensor & other) const;
at::Tensor xlogy(const at::Scalar & other) const;
at::Tensor & xlogy_(const at::Tensor & other) const;
at::Tensor & xlogy_(const at::Scalar & other) const;
at::Tensor logdet() const;
at::Tensor log_softmax(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor log_softmax(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
at::Tensor logcumsumexp(int64_t dim) const;
at::Tensor logcumsumexp(at::Dimname dim) const;
at::Tensor logsumexp(at::IntArrayRef dim, bool keepdim=false) const;
at::Tensor logsumexp(at::DimnameList dim, bool keepdim=false) const;
at::Tensor matmul(const at::Tensor & other) const;
at::Tensor matrix_power(int64_t n) const;
at::Tensor matrix_exp() const;
::std::tuple aminmax(c10::optional dim=c10::nullopt, bool keepdim=false) const;
::std::tuple max(int64_t dim, bool keepdim=false) const;
::std::tuple max(at::Dimname dim, bool keepdim=false) const;
at::Tensor amax(at::IntArrayRef dim={}, bool keepdim=false) const;
at::Tensor mean(c10::optional dtype=c10::nullopt) const;
at::Tensor mean(at::IntArrayRef dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor mean(at::DimnameList dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor nanmean(at::IntArrayRef dim={}, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor median() const;
::std::tuple median(int64_t dim, bool keepdim=false) const;
::std::tuple median(at::Dimname dim, bool keepdim=false) const;
at::Tensor nanmedian() const;
::std::tuple nanmedian(int64_t dim, bool keepdim=false) const;
::std::tuple nanmedian(at::Dimname dim, bool keepdim=false) const;
::std::tuple min(int64_t dim, bool keepdim=false) const;
::std::tuple min(at::Dimname dim, bool keepdim=false) const;
at::Tensor amin(at::IntArrayRef dim={}, bool keepdim=false) const;
at::Tensor mm(const at::Tensor & mat2) const;
::std::tuple mode(int64_t dim=-1, bool keepdim=false) const;
::std::tuple mode(at::Dimname dim, bool keepdim=false) const;
at::Tensor mul(const at::Tensor & other) const;
at::Tensor & mul_(const at::Tensor & other) const;
at::Tensor mul(const at::Scalar & other) const;
at::Tensor & mul_(const at::Scalar & other) const;
at::Tensor multiply(const at::Tensor & other) const;
at::Tensor & multiply_(const at::Tensor & other) const;
at::Tensor multiply(const at::Scalar & other) const;
at::Tensor & multiply_(const at::Scalar & other) const;
at::Tensor mv(const at::Tensor & vec) const;
at::Tensor mvlgamma(int64_t p) const;
at::Tensor & mvlgamma_(int64_t p) const;
at::Tensor narrow_copy(int64_t dim, int64_t start, int64_t length) const;
at::Tensor narrow(int64_t dim, int64_t start, int64_t length) const;
at::Tensor narrow(int64_t dim, const at::Tensor & start, int64_t length) const;
at::Tensor permute(at::IntArrayRef dims) const;
at::Tensor movedim(at::IntArrayRef source, at::IntArrayRef destination) const;
at::Tensor movedim(int64_t source, int64_t destination) const;
at::Tensor moveaxis(at::IntArrayRef source, at::IntArrayRef destination) const;
at::Tensor moveaxis(int64_t source, int64_t destination) const;
at::Tensor numpy_T() const;
bool is_pinned(c10::optional device=c10::nullopt) const;
at::Tensor pin_memory(c10::optional device=c10::nullopt) const;
at::Tensor pinverse(double rcond=1e-15) const;
at::Tensor rad2deg() const;
at::Tensor & rad2deg_() const;
at::Tensor deg2rad() const;
at::Tensor & deg2rad_() const;
at::Tensor ravel() const;
at::Tensor reciprocal() const;
at::Tensor & reciprocal_() const;
at::Tensor neg() const;
at::Tensor & neg_() const;
at::Tensor negative() const;
at::Tensor & negative_() const;
at::Tensor repeat(at::IntArrayRef repeats) const;
at::Tensor repeat_interleave(const at::Tensor & repeats, c10::optional dim=c10::nullopt, c10::optional output_size=c10::nullopt) const;
at::Tensor repeat_interleave(int64_t repeats, c10::optional dim=c10::nullopt, c10::optional output_size=c10::nullopt) const;
at::Tensor reshape(at::IntArrayRef shape) const;
at::Tensor _reshape_alias(at::IntArrayRef size, at::IntArrayRef stride) const;
at::Tensor reshape_as(const at::Tensor & other) const;
at::Tensor round() const;
at::Tensor & round_() const;
at::Tensor relu() const;
at::Tensor & relu_() const;
at::Tensor prelu(const at::Tensor & weight) const;
::std::tuple prelu_backward(const at::Tensor & grad_output, const at::Tensor & weight) const;
at::Tensor hardshrink(const at::Scalar & lambd=0.5) const;
at::Tensor hardshrink_backward(const at::Tensor & grad_out, const at::Scalar & lambd) const;
at::Tensor rsqrt() const;
at::Tensor & rsqrt_() const;
at::Tensor select(at::Dimname dim, int64_t index) const;
at::Tensor select(int64_t dim, int64_t index) const;
at::Tensor sigmoid() const;
at::Tensor & sigmoid_() const;
at::Tensor logit(c10::optional eps=c10::nullopt) const;
at::Tensor & logit_(c10::optional eps=c10::nullopt) const;
at::Tensor sin() const;
at::Tensor & sin_() const;
at::Tensor sinc() const;
at::Tensor & sinc_() const;
at::Tensor sinh() const;
at::Tensor & sinh_() const;
at::Tensor detach() const;
at::Tensor & detach_() const;
int64_t size(at::Dimname dim) const;
at::Tensor slice(int64_t dim=0, c10::optional start=c10::nullopt, c10::optional end=c10::nullopt, int64_t step=1) const;
::std::tuple slogdet() const;
at::Tensor smm(const at::Tensor & mat2) const;
at::Tensor softmax(int64_t dim, c10::optional dtype=c10::nullopt) const;
at::Tensor softmax(at::Dimname dim, c10::optional dtype=c10::nullopt) const;
::std::vector unsafe_split(int64_t split_size, int64_t dim=0) const;
::std::vector split(int64_t split_size, int64_t dim=0) const;
::std::vector unsafe_split_with_sizes(at::IntArrayRef split_sizes, int64_t dim=0) const;
::std::vector split_with_sizes(at::IntArrayRef split_sizes, int64_t dim=0) const;
::std::vector hsplit(int64_t sections) const;
::std::vector hsplit(at::IntArrayRef indices) const;
::std::vector vsplit(int64_t sections) const;
::std::vector vsplit(at::IntArrayRef indices) const;
::std::vector dsplit(int64_t sections) const;
::std::vector dsplit(at::IntArrayRef indices) const;
at::Tensor squeeze() const;
at::Tensor squeeze(int64_t dim) const;
at::Tensor squeeze(at::Dimname dim) const;
at::Tensor & squeeze_() const;
at::Tensor & squeeze_(int64_t dim) const;
at::Tensor & squeeze_(at::Dimname dim) const;
at::Tensor sspaddmm(const at::Tensor & mat1, const at::Tensor & mat2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor stft(int64_t n_fft, c10::optional hop_length=c10::nullopt, c10::optional win_length=c10::nullopt, const c10::optional & window={}, bool normalized=false, c10::optional onesided=c10::nullopt, c10::optional return_complex=c10::nullopt) const;
at::Tensor istft(int64_t n_fft, c10::optional hop_length=c10::nullopt, c10::optional win_length=c10::nullopt, const c10::optional & window={}, bool center=true, bool normalized=false, c10::optional onesided=c10::nullopt, c10::optional length=c10::nullopt, bool return_complex=false) const;
int64_t stride(at::Dimname dim) const;
at::Tensor sum(c10::optional dtype=c10::nullopt) const;
at::Tensor sum(at::IntArrayRef dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor sum(at::DimnameList dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor nansum(c10::optional dtype=c10::nullopt) const;
at::Tensor nansum(at::IntArrayRef dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor sum_to_size(at::IntArrayRef size) const;
at::Tensor sqrt() const;
at::Tensor & sqrt_() const;
at::Tensor square() const;
at::Tensor & square_() const;
at::Tensor std(bool unbiased=true) const;
at::Tensor std(at::IntArrayRef dim, bool unbiased=true, bool keepdim=false) const;
at::Tensor std(c10::optional dim, c10::optional correction, bool keepdim=false) const;
at::Tensor std(at::DimnameList dim, bool unbiased=true, bool keepdim=false) const;
at::Tensor std(at::DimnameList dim, c10::optional correction, bool keepdim=false) const;
at::Tensor prod(c10::optional dtype=c10::nullopt) const;
at::Tensor prod(int64_t dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor prod(at::Dimname dim, bool keepdim=false, c10::optional dtype=c10::nullopt) const;
at::Tensor t() const;
at::Tensor & t_() const;
at::Tensor tan() const;
at::Tensor & tan_() const;
at::Tensor tanh() const;
at::Tensor & tanh_() const;
at::Tensor tile(at::IntArrayRef dims) const;
at::Tensor transpose(int64_t dim0, int64_t dim1) const;
at::Tensor transpose(at::Dimname dim0, at::Dimname dim1) const;
at::Tensor & transpose_(int64_t dim0, int64_t dim1) const;
at::Tensor flip(at::IntArrayRef dims) const;
at::Tensor fliplr() const;
at::Tensor flipud() const;
at::Tensor roll(at::IntArrayRef shifts, at::IntArrayRef dims={}) const;
at::Tensor rot90(int64_t k=1, at::IntArrayRef dims={0,1}) const;
at::Tensor trunc() const;
at::Tensor & trunc_() const;
at::Tensor fix() const;
at::Tensor & fix_() const;
at::Tensor type_as(const at::Tensor & other) const;
at::Tensor unsqueeze(int64_t dim) const;
at::Tensor & unsqueeze_(int64_t dim) const;
at::Tensor var(bool unbiased=true) const;
at::Tensor var(at::IntArrayRef dim, bool unbiased=true, bool keepdim=false) const;
at::Tensor var(c10::optional dim, c10::optional correction, bool keepdim=false) const;
at::Tensor var(at::DimnameList dim, bool unbiased=true, bool keepdim=false) const;
at::Tensor var(at::DimnameList dim, c10::optional correction, bool keepdim=false) const;
at::Tensor view_as(const at::Tensor & other) const;
at::Tensor where(const at::Tensor & condition, const at::Tensor & other) const;
at::Tensor norm(const c10::optional & p, at::ScalarType dtype) const;
at::Tensor norm(const at::Scalar & p=2) const;
at::Tensor norm(const c10::optional & p, at::IntArrayRef dim, bool keepdim, at::ScalarType dtype) const;
at::Tensor norm(const c10::optional & p, at::IntArrayRef dim, bool keepdim=false) const;
at::Tensor norm(const c10::optional & p, at::DimnameList dim, bool keepdim, at::ScalarType dtype) const;
at::Tensor norm(const c10::optional & p, at::DimnameList dim, bool keepdim=false) const;
::std::tuple frexp() const;
at::Tensor clone(c10::optional memory_format=c10::nullopt) const;
at::Tensor positive() const;
const at::Tensor & resize_as_(const at::Tensor & the_template, c10::optional memory_format=c10::nullopt) const;
at::Tensor & zero_() const;
at::Tensor sub(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor & sub_(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor sub(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor & sub_(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor subtract(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor & subtract_(const at::Tensor & other, const at::Scalar & alpha=1) const;
at::Tensor subtract(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor & subtract_(const at::Scalar & other, const at::Scalar & alpha=1) const;
at::Tensor heaviside(const at::Tensor & values) const;
at::Tensor & heaviside_(const at::Tensor & values) const;
at::Tensor addmm(const at::Tensor & mat1, const at::Tensor & mat2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor & addmm_(const at::Tensor & mat1, const at::Tensor & mat2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
const at::Tensor & sparse_resize_(at::IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) const;
const at::Tensor & sparse_resize_and_clear_(at::IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) const;
at::Tensor sparse_mask(const at::Tensor & mask) const;
at::Tensor to_dense(c10::optional dtype=c10::nullopt) const;
int64_t sparse_dim() const;
int64_t _dimI() const;
int64_t dense_dim() const;
int64_t _dimV() const;
int64_t _nnz() const;
at::Tensor coalesce() const;
bool is_coalesced() const;
at::Tensor _indices() const;
at::Tensor _values() const;
at::Tensor & _coalesced_(bool coalesced) const;
at::Tensor indices() const;
at::Tensor values() const;
at::Tensor crow_indices() const;
at::Tensor col_indices() const;
::std::vector unbind(int64_t dim=0) const;
::std::vector unbind(at::Dimname dim) const;
at::Tensor to_sparse(int64_t sparse_dim) const;
at::Tensor to_sparse() const;
at::Tensor to_mkldnn(c10::optional dtype=c10::nullopt) const;
at::Tensor dequantize() const;
double q_scale() const;
int64_t q_zero_point() const;
at::Tensor q_per_channel_scales() const;
at::Tensor q_per_channel_zero_points() const;
int64_t q_per_channel_axis() const;
at::Tensor int_repr() const;
at::QScheme qscheme() const;
at::Tensor to(at::TensorOptions options={}, bool non_blocking=false, bool copy=false, c10::optional memory_format=c10::nullopt) const;
at::Tensor to(c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory, bool non_blocking, bool copy, c10::optional memory_format) const;
at::Tensor to(at::Device device, at::ScalarType dtype, bool non_blocking=false, bool copy=false, c10::optional memory_format=c10::nullopt) const;
at::Tensor to(at::ScalarType dtype, bool non_blocking=false, bool copy=false, c10::optional memory_format=c10::nullopt) const;
at::Tensor to(const at::Tensor & other, bool non_blocking=false, bool copy=false, c10::optional memory_format=c10::nullopt) const;
at::Scalar item() const;
at::Tensor & set_(at::Storage source) const;
at::Tensor & set_(at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) const;
at::Tensor & set_(const at::Tensor & source) const;
at::Tensor & set_() const;
bool is_set_to(const at::Tensor & tensor) const;
at::Tensor & masked_fill_(const at::Tensor & mask, const at::Scalar & value) const;
at::Tensor masked_fill(const at::Tensor & mask, const at::Scalar & value) const;
at::Tensor & masked_fill_(const at::Tensor & mask, const at::Tensor & value) const;
at::Tensor masked_fill(const at::Tensor & mask, const at::Tensor & value) const;
at::Tensor & masked_scatter_(const at::Tensor & mask, const at::Tensor & source) const;
at::Tensor masked_scatter(const at::Tensor & mask, const at::Tensor & source) const;
at::Tensor view(at::IntArrayRef size) const;
at::Tensor view(at::ScalarType dtype) const;
at::Tensor & put_(const at::Tensor & index, const at::Tensor & source, bool accumulate=false) const;
at::Tensor put(const at::Tensor & index, const at::Tensor & source, bool accumulate=false) const;
at::Tensor & index_add_(int64_t dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor & index_add_(int64_t dim, const at::Tensor & index, const at::Tensor & source, const at::Scalar & alpha) const;
at::Tensor index_add(int64_t dim, const at::Tensor & index, const at::Tensor & source) const;
at::Tensor index_add(int64_t dim, const at::Tensor & index, const at::Tensor & source, const at::Scalar & alpha) const;
at::Tensor index_add(at::Dimname dim, const at::Tensor & index, const at::Tensor & source, const at::Scalar & alpha=1) const;
at::Tensor & index_fill_(int64_t dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor index_fill(int64_t dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor & index_fill_(int64_t dim, const at::Tensor & index, const at::Tensor & value) const;
at::Tensor index_fill(int64_t dim, const at::Tensor & index, const at::Tensor & value) const;
at::Tensor & index_fill_(at::Dimname dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor & index_fill_(at::Dimname dim, const at::Tensor & index, const at::Tensor & value) const;
at::Tensor index_fill(at::Dimname dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor index_fill(at::Dimname dim, const at::Tensor & index, const at::Tensor & value) const;
at::Tensor scatter(int64_t dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor & scatter_(int64_t dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor scatter(int64_t dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor & scatter_(int64_t dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor scatter(int64_t dim, const at::Tensor & index, const at::Tensor & src, c10::string_view reduce) const;
at::Tensor & scatter_(int64_t dim, const at::Tensor & index, const at::Tensor & src, c10::string_view reduce) const;
at::Tensor scatter(int64_t dim, const at::Tensor & index, const at::Scalar & value, c10::string_view reduce) const;
at::Tensor & scatter_(int64_t dim, const at::Tensor & index, const at::Scalar & value, c10::string_view reduce) const;
at::Tensor scatter(at::Dimname dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor scatter(at::Dimname dim, const at::Tensor & index, const at::Scalar & value) const;
at::Tensor scatter_add(int64_t dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor & scatter_add_(int64_t dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor scatter_add(at::Dimname dim, const at::Tensor & index, const at::Tensor & src) const;
at::Tensor & eq_(const at::Scalar & other) const;
at::Tensor & eq_(const at::Tensor & other) const;
at::Tensor bitwise_and(const at::Scalar & other) const;
at::Tensor bitwise_and(const at::Tensor & other) const;
at::Tensor & bitwise_and_(const at::Scalar & other) const;
at::Tensor & bitwise_and_(const at::Tensor & other) const;
at::Tensor __and__(const at::Scalar & other) const;
at::Tensor __and__(const at::Tensor & other) const;
at::Tensor & __iand__(const at::Scalar & other) const;
at::Tensor & __iand__(const at::Tensor & other) const;
at::Tensor bitwise_or(const at::Scalar & other) const;
at::Tensor bitwise_or(const at::Tensor & other) const;
at::Tensor & bitwise_or_(const at::Scalar & other) const;
at::Tensor & bitwise_or_(const at::Tensor & other) const;
at::Tensor __or__(const at::Scalar & other) const;
at::Tensor __or__(const at::Tensor & other) const;
at::Tensor & __ior__(const at::Scalar & other) const;
at::Tensor & __ior__(const at::Tensor & other) const;
at::Tensor bitwise_xor(const at::Scalar & other) const;
at::Tensor bitwise_xor(const at::Tensor & other) const;
at::Tensor & bitwise_xor_(const at::Scalar & other) const;
at::Tensor & bitwise_xor_(const at::Tensor & other) const;
at::Tensor __xor__(const at::Scalar & other) const;
at::Tensor __xor__(const at::Tensor & other) const;
at::Tensor & __ixor__(const at::Scalar & other) const;
at::Tensor & __ixor__(const at::Tensor & other) const;
at::Tensor __lshift__(const at::Scalar & other) const;
at::Tensor __lshift__(const at::Tensor & other) const;
at::Tensor & __ilshift__(const at::Scalar & other) const;
at::Tensor & __ilshift__(const at::Tensor & other) const;
at::Tensor bitwise_left_shift(const at::Tensor & other) const;
at::Tensor & bitwise_left_shift_(const at::Tensor & other) const;
at::Tensor bitwise_left_shift(const at::Scalar & other) const;
at::Tensor & bitwise_left_shift_(const at::Scalar & other) const;
at::Tensor __rshift__(const at::Scalar & other) const;
at::Tensor __rshift__(const at::Tensor & other) const;
at::Tensor & __irshift__(const at::Scalar & other) const;
at::Tensor & __irshift__(const at::Tensor & other) const;
at::Tensor bitwise_right_shift(const at::Tensor & other) const;
at::Tensor & bitwise_right_shift_(const at::Tensor & other) const;
at::Tensor bitwise_right_shift(const at::Scalar & other) const;
at::Tensor & bitwise_right_shift_(const at::Scalar & other) const;
at::Tensor & tril_(int64_t diagonal=0) const;
at::Tensor & triu_(int64_t diagonal=0) const;
at::Tensor & digamma_() const;
at::Tensor & lerp_(const at::Tensor & end, const at::Scalar & weight) const;
at::Tensor & lerp_(const at::Tensor & end, const at::Tensor & weight) const;
at::Tensor & addbmm_(const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor addbmm(const at::Tensor & batch1, const at::Tensor & batch2, const at::Scalar & beta=1, const at::Scalar & alpha=1) const;
at::Tensor & random_(int64_t from, c10::optional to, c10::optional generator=c10::nullopt) const;
at::Tensor & random_(int64_t to, c10::optional generator=c10::nullopt) const;
at::Tensor & random_(c10::optional generator=c10::nullopt) const;
at::Tensor & uniform_(double from=0, double to=1, c10::optional generator=c10::nullopt) const;
at::Tensor & cauchy_(double median=0, double sigma=1, c10::optional generator=c10::nullopt) const;
at::Tensor & log_normal_(double mean=1, double std=2, c10::optional generator=c10::nullopt) const;
at::Tensor & exponential_(double lambd=1, c10::optional generator=c10::nullopt) const;
at::Tensor & geometric_(double p, c10::optional generator=c10::nullopt) const;
at::Tensor diag(int64_t diagonal=0) const;
at::Tensor cross(const at::Tensor & other, c10::optional dim=c10::nullopt) const;
at::Tensor triu(int64_t diagonal=0) const;
at::Tensor tril(int64_t diagonal=0) const;
at::Tensor trace() const;
at::Tensor ne(const at::Scalar & other) const;
at::Tensor ne(const at::Tensor & other) const;
at::Tensor & ne_(const at::Scalar & other) const;
at::Tensor & ne_(const at::Tensor & other) const;
at::Tensor not_equal(const at::Scalar & other) const;
at::Tensor not_equal(const at::Tensor & other) const;
at::Tensor & not_equal_(const at::Scalar & other) const;
at::Tensor & not_equal_(const at::Tensor & other) const;
at::Tensor eq(const at::Scalar & other) const;
at::Tensor eq(const at::Tensor & other) const;
at::Tensor ge(const at::Scalar & other) const;
at::Tensor ge(const at::Tensor & other) const;
at::Tensor & ge_(const at::Scalar & other) const;
at::Tensor & ge_(const at::Tensor & other) const;
at::Tensor greater_equal(const at::Scalar & other) const;
at::Tensor greater_equal(const at::Tensor & other) const;
at::Tensor & greater_equal_(const at::Scalar & other) const;
at::Tensor & greater_equal_(const at::Tensor & other) const;
at::Tensor le(const at::Scalar & other) const;
at::Tensor le(const at::Tensor & other) const;
at::Tensor & le_(const at::Scalar & other) const;
at::Tensor & le_(const at::Tensor & other) const;
at::Tensor less_equal(const at::Scalar & other) const;
at::Tensor less_equal(const at::Tensor & other) const;
at::Tensor & less_equal_(const at::Scalar & other) const;
at::Tensor & less_equal_(const at::Tensor & other) const;
at::Tensor gt(const at::Scalar & other) const;
at::Tensor gt(const at::Tensor & other) const;
at::Tensor & gt_(const at::Scalar & other) const;
at::Tensor & gt_(const at::Tensor & other) const;
at::Tensor greater(const at::Scalar & other) const;
at::Tensor greater(const at::Tensor & other) const;
at::Tensor & greater_(const at::Scalar & other) const;
at::Tensor & greater_(const at::Tensor & other) const;
at::Tensor lt(const at::Scalar & other) const;
at::Tensor lt(const at::Tensor & other) const;
at::Tensor & lt_(const at::Scalar & other) const;
at::Tensor & lt_(const at::Tensor & other) const;
at::Tensor less(const at::Scalar & other) const;
at::Tensor less(const at::Tensor & other) const;
at::Tensor & less_(const at::Scalar & other) const;
at::Tensor & less_(const at::Tensor & other) const;
at::Tensor take(const at::Tensor & index) const;
at::Tensor take_along_dim(const at::Tensor & indices, c10::optional dim=c10::nullopt) const;
at::Tensor index_select(int64_t dim, const at::Tensor & index) const;
at::Tensor index_select(at::Dimname dim, const at::Tensor & index) const;
at::Tensor masked_select(const at::Tensor & mask) const;
at::Tensor nonzero() const;
::std::vector nonzero_numpy() const;
at::Tensor gather(int64_t dim, const at::Tensor & index, bool sparse_grad=false) const;
at::Tensor gather(at::Dimname dim, const at::Tensor & index, bool sparse_grad=false) const;
at::Tensor addcmul(const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) const;
at::Tensor & addcmul_(const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) const;
at::Tensor addcdiv(const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) const;
at::Tensor & addcdiv_(const at::Tensor & tensor1, const at::Tensor & tensor2, const at::Scalar & value=1) const;
::std::tuple lstsq(const at::Tensor & A) const;
::std::tuple triangular_solve(const at::Tensor & A, bool upper=true, bool transpose=false, bool unitriangular=false) const;
::std::tuple symeig(bool eigenvectors=false, bool upper=true) const;
::std::tuple eig(bool eigenvectors=false) const;
::std::tuple svd(bool some=true, bool compute_uv=true) const;
at::Tensor swapaxes(int64_t axis0, int64_t axis1) const;
at::Tensor & swapaxes_(int64_t axis0, int64_t axis1) const;
at::Tensor swapdims(int64_t dim0, int64_t dim1) const;
at::Tensor & swapdims_(int64_t dim0, int64_t dim1) const;
at::Tensor cholesky(bool upper=false) const;
at::Tensor cholesky_solve(const at::Tensor & input2, bool upper=false) const;
::std::tuple solve(const at::Tensor & A) const;
at::Tensor cholesky_inverse(bool upper=false) const;
::std::tuple qr(bool some=true) const;
::std::tuple