// generated by rake generate:functions // do not edit by hand #include #include #include "templates.hpp" void add_tensor_functions(Module m) { m .define_method( "_abs", *[](const Tensor &self) { return self.abs(); }) .define_method( "_abs_", *[](Tensor &self) { return self.abs_(); }) .define_method( "_acos", *[](const Tensor &self) { return self.acos(); }) .define_method( "_acos_", *[](Tensor &self) { return self.acos_(); }) .define_method( "_add__scalar", *[](Tensor &self, Scalar other, Scalar alpha) { return self.add_(other, alpha); }) .define_method( "_add__tensor", *[](Tensor &self, const Tensor &other, Scalar alpha) { return self.add_(other, alpha); }) .define_method( "_add_scalar", *[](const Tensor &self, Scalar other, Scalar alpha) { return self.add(other, alpha); }) .define_method( "_add_tensor", *[](const Tensor &self, const Tensor &other, Scalar alpha) { return self.add(other, alpha); }) .define_method( "_addbmm", *[](const Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) { return self.addbmm(batch1, batch2, beta, alpha); }) .define_method( "_addbmm_", *[](Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) { return self.addbmm_(batch1, batch2, beta, alpha); }) .define_method( "_addcdiv", *[](const Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) { return self.addcdiv(tensor1, tensor2, value); }) .define_method( "_addcdiv_", *[](Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) { return self.addcdiv_(tensor1, tensor2, value); }) .define_method( "_addcmul", *[](const Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) { return self.addcmul(tensor1, tensor2, value); }) .define_method( "_addcmul_", *[](Tensor &self, const Tensor &tensor1, const Tensor &tensor2, Scalar value) { return self.addcmul_(tensor1, tensor2, value); }) .define_method( "_addmm", *[](const Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) { return self.addmm(mat1, mat2, beta, alpha); }) .define_method( "_addmm_", *[](Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) { return self.addmm_(mat1, mat2, beta, alpha); }) .define_method( "_addmv", *[](const Tensor &self, const Tensor &mat, const Tensor &vec, Scalar beta, Scalar alpha) { return self.addmv(mat, vec, beta, alpha); }) .define_method( "_addmv_", *[](Tensor &self, const Tensor &mat, const Tensor &vec, Scalar beta, Scalar alpha) { return self.addmv_(mat, vec, beta, alpha); }) .define_method( "_addr", *[](const Tensor &self, const Tensor &vec1, const Tensor &vec2, Scalar beta, Scalar alpha) { return self.addr(vec1, vec2, beta, alpha); }) .define_method( "_addr_", *[](Tensor &self, const Tensor &vec1, const Tensor &vec2, Scalar beta, Scalar alpha) { return self.addr_(vec1, vec2, beta, alpha); }) .define_method( "_alias", *[](Tensor &self) { return self.alias(); }) .define_method( "_align_as", *[](const Tensor &self, const Tensor &other) { return self.align_as(other); }) .define_method( "_all", *[](const Tensor &self) { return self.all(); }) .define_method( "_all_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return self.all(dim, keepdim); }) .define_method( "_allclose", *[](const Tensor &self, const Tensor &other, double rtol, double atol, bool equal_nan) { return self.allclose(other, rtol, atol, equal_nan); }) .define_method( "_any", *[](const Tensor &self) { return self.any(); }) .define_method( "_any_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return self.any(dim, keepdim); }) .define_method( "_argmax", *[](const Tensor &self) { return self.argmax(); }) .define_method( "_argmax_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return self.argmax(dim, keepdim); }) .define_method( "_argmin", *[](const Tensor &self) { return self.argmin(); }) .define_method( "_argmin_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return self.argmin(dim, keepdim); }) .define_method( "_argsort", *[](const Tensor &self, int64_t dim, bool descending) { return self.argsort(dim, descending); }) .define_method( "_as_strided", *[](Tensor &self, IntArrayRef size, IntArrayRef stride) { return self.as_strided(size, stride); }) .define_method( "_as_strided_", *[](Tensor &self, IntArrayRef size, IntArrayRef stride) { return self.as_strided_(size, stride); }) .define_method( "_as_strided__storage_offset", *[](Tensor &self, IntArrayRef size, IntArrayRef stride, int64_t storage_offset) { return self.as_strided_(size, stride, storage_offset); }) .define_method( "_as_strided_storage_offset", *[](Tensor &self, IntArrayRef size, IntArrayRef stride, int64_t storage_offset) { return self.as_strided(size, stride, storage_offset); }) .define_method( "_asin", *[](const Tensor &self) { return self.asin(); }) .define_method( "_asin_", *[](Tensor &self) { return self.asin_(); }) .define_method( "_atan", *[](const Tensor &self) { return self.atan(); }) .define_method( "_atan2", *[](const Tensor &self, const Tensor &other) { return self.atan2(other); }) .define_method( "_atan2_", *[](Tensor &self, const Tensor &other) { return self.atan2_(other); }) .define_method( "_atan_", *[](Tensor &self) { return self.atan_(); }) .define_method( "_backward", *[](const Tensor &self, OptionalTensor gradient, bool keep_graph, bool create_graph) { return self.backward(gradient, keep_graph, create_graph); }) .define_method( "_baddbmm", *[](const Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) { return self.baddbmm(batch1, batch2, beta, alpha); }) .define_method( "_baddbmm_", *[](Tensor &self, const Tensor &batch1, const Tensor &batch2, Scalar beta, Scalar alpha) { return self.baddbmm_(batch1, batch2, beta, alpha); }) .define_method( "_bernoulli", *[](const Tensor &self) { return self.bernoulli(); }) .define_method( "_bernoulli__float", *[](Tensor &self, double p) { return self.bernoulli_(p); }) .define_method( "_bernoulli__tensor", *[](Tensor &self, const Tensor &p) { return self.bernoulli_(p); }) .define_method( "_bernoulli_p", *[](const Tensor &self, double p) { return self.bernoulli(p); }) .define_method( "_bincount", *[](const Tensor &self, OptionalTensor weights, int64_t minlength) { return self.bincount(weights, minlength); }) .define_method( "_bitwise_not", *[](const Tensor &self) { return self.bitwise_not(); }) .define_method( "_bitwise_not_", *[](Tensor &self) { return self.bitwise_not_(); }) .define_method( "_bmm", *[](const Tensor &self, const Tensor &mat2) { return self.bmm(mat2); }) .define_method( "_cauchy_", *[](Tensor &self, double median, double sigma) { return self.cauchy_(median, sigma); }) .define_method( "_ceil", *[](const Tensor &self) { return self.ceil(); }) .define_method( "_ceil_", *[](Tensor &self) { return self.ceil_(); }) .define_method( "_cholesky", *[](const Tensor &self, bool upper) { return self.cholesky(upper); }) .define_method( "_cholesky_inverse", *[](const Tensor &self, bool upper) { return self.cholesky_inverse(upper); }) .define_method( "_cholesky_solve", *[](const Tensor &self, const Tensor &input2, bool upper) { return self.cholesky_solve(input2, upper); }) .define_method( "_chunk", *[](Tensor &self, int64_t chunks, int64_t dim) { return self.chunk(chunks, dim); }) .define_method( "_clamp_max", *[](const Tensor &self, Scalar max) { return self.clamp_max(max); }) .define_method( "_clamp_max_", *[](Tensor &self, Scalar max) { return self.clamp_max_(max); }) .define_method( "_clamp_min", *[](const Tensor &self, Scalar min) { return self.clamp_min(min); }) .define_method( "_clamp_min_", *[](Tensor &self, Scalar min) { return self.clamp_min_(min); }) .define_method( "_clone", *[](const Tensor &self) { return self.clone(); }) .define_method( "_coalesce", *[](const Tensor &self) { return self.coalesce(); }) .define_method( "_copy_", *[](Tensor &self, const Tensor &src, bool non_blocking) { return self.copy_(src, non_blocking); }) .define_method( "_cos", *[](const Tensor &self) { return self.cos(); }) .define_method( "_cos_", *[](Tensor &self) { return self.cos_(); }) .define_method( "_cosh", *[](const Tensor &self) { return self.cosh(); }) .define_method( "_cosh_", *[](Tensor &self) { return self.cosh_(); }) .define_method( "_cumprod", *[](const Tensor &self, int64_t dim, OptionalScalarType dtype) { return self.cumprod(dim, dtype); }) .define_method( "_cumsum", *[](const Tensor &self, int64_t dim, OptionalScalarType dtype) { return self.cumsum(dim, dtype); }) .define_method( "_data", *[](const Tensor &self) { return self.data(); }) .define_method( "_dense_dim", *[](const Tensor &self) { return self.dense_dim(); }) .define_method( "_dequantize", *[](const Tensor &self) { return self.dequantize(); }) .define_method( "_det", *[](const Tensor &self) { return self.det(); }) .define_method( "_detach", *[](const Tensor &self) { return self.detach(); }) .define_method( "_detach_", *[](Tensor &self) { return self.detach_(); }) .define_method( "_diag", *[](const Tensor &self, int64_t diagonal) { return self.diag(diagonal); }) .define_method( "_diag_embed", *[](const Tensor &self, int64_t offset, int64_t dim1, int64_t dim2) { return self.diag_embed(offset, dim1, dim2); }) .define_method( "_diagflat", *[](const Tensor &self, int64_t offset) { return self.diagflat(offset); }) .define_method( "_diagonal", *[](Tensor &self, int64_t offset, int64_t dim1, int64_t dim2) { return self.diagonal(offset, dim1, dim2); }) .define_method( "_digamma", *[](const Tensor &self) { return self.digamma(); }) .define_method( "_digamma_", *[](Tensor &self) { return self.digamma_(); }) .define_method( "_dist", *[](const Tensor &self, const Tensor &other, Scalar p) { return self.dist(other, p); }) .define_method( "_div__scalar", *[](Tensor &self, Scalar other) { return self.div_(other); }) .define_method( "_div__tensor", *[](Tensor &self, const Tensor &other) { return self.div_(other); }) .define_method( "_div_scalar", *[](const Tensor &self, Scalar other) { return self.div(other); }) .define_method( "_div_tensor", *[](const Tensor &self, const Tensor &other) { return self.div(other); }) .define_method( "_dot", *[](const Tensor &self, const Tensor &tensor) { return self.dot(tensor); }) .define_method( "_eig", *[](const Tensor &self, bool eigenvectors) { return wrap(self.eig(eigenvectors)); }) .define_method( "_eq__scalar", *[](Tensor &self, Scalar other) { return self.eq_(other); }) .define_method( "_eq__tensor", *[](Tensor &self, const Tensor &other) { return self.eq_(other); }) .define_method( "_eq_scalar", *[](const Tensor &self, Scalar other) { return self.eq(other); }) .define_method( "_eq_tensor", *[](const Tensor &self, const Tensor &other) { return self.eq(other); }) .define_method( "_equal", *[](const Tensor &self, const Tensor &other) { return self.equal(other); }) .define_method( "_erf", *[](const Tensor &self) { return self.erf(); }) .define_method( "_erf_", *[](Tensor &self) { return self.erf_(); }) .define_method( "_erfc", *[](const Tensor &self) { return self.erfc(); }) .define_method( "_erfc_", *[](Tensor &self) { return self.erfc_(); }) .define_method( "_erfinv", *[](const Tensor &self) { return self.erfinv(); }) .define_method( "_erfinv_", *[](Tensor &self) { return self.erfinv_(); }) .define_method( "_exp", *[](const Tensor &self) { return self.exp(); }) .define_method( "_exp_", *[](Tensor &self) { return self.exp_(); }) .define_method( "_expand", *[](Tensor &self, IntArrayRef size, bool implicit) { return self.expand(size, implicit); }) .define_method( "_expand_as", *[](const Tensor &self, const Tensor &other) { return self.expand_as(other); }) .define_method( "_expm1", *[](const Tensor &self) { return self.expm1(); }) .define_method( "_expm1_", *[](Tensor &self) { return self.expm1_(); }) .define_method( "_exponential_", *[](Tensor &self, double lambd) { return self.exponential_(lambd); }) .define_method( "_fft", *[](const Tensor &self, int64_t signal_ndim, bool normalized) { return self.fft(signal_ndim, normalized); }) .define_method( "_fill__scalar", *[](Tensor &self, Scalar value) { return self.fill_(value); }) .define_method( "_fill__tensor", *[](Tensor &self, const Tensor &value) { return self.fill_(value); }) .define_method( "_fill_diagonal_", *[](Tensor &self, Scalar fill_value, bool wrap) { return self.fill_diagonal_(fill_value, wrap); }) .define_method( "_flatten_using_ints", *[](const Tensor &self, int64_t start_dim, int64_t end_dim) { return self.flatten(start_dim, end_dim); }) .define_method( "_flip", *[](const Tensor &self, IntArrayRef dims) { return self.flip(dims); }) .define_method( "_floor", *[](const Tensor &self) { return self.floor(); }) .define_method( "_floor_", *[](Tensor &self) { return self.floor_(); }) .define_method( "_fmod__scalar", *[](Tensor &self, Scalar other) { return self.fmod_(other); }) .define_method( "_fmod__tensor", *[](Tensor &self, const Tensor &other) { return self.fmod_(other); }) .define_method( "_fmod_scalar", *[](const Tensor &self, Scalar other) { return self.fmod(other); }) .define_method( "_fmod_tensor", *[](const Tensor &self, const Tensor &other) { return self.fmod(other); }) .define_method( "_frac", *[](const Tensor &self) { return self.frac(); }) .define_method( "_frac_", *[](Tensor &self) { return self.frac_(); }) .define_method( "_gather", *[](const Tensor &self, int64_t dim, const Tensor &index, bool sparse_grad) { return self.gather(dim, index, sparse_grad); }) .define_method( "_ge__scalar", *[](Tensor &self, Scalar other) { return self.ge_(other); }) .define_method( "_ge__tensor", *[](Tensor &self, const Tensor &other) { return self.ge_(other); }) .define_method( "_ge_scalar", *[](const Tensor &self, Scalar other) { return self.ge(other); }) .define_method( "_ge_tensor", *[](const Tensor &self, const Tensor &other) { return self.ge(other); }) .define_method( "_geometric_", *[](Tensor &self, double p) { return self.geometric_(p); }) .define_method( "_geqrf", *[](const Tensor &self) { return wrap(self.geqrf()); }) .define_method( "_ger", *[](const Tensor &self, const Tensor &vec2) { return self.ger(vec2); }) .define_method( "_gt__scalar", *[](Tensor &self, Scalar other) { return self.gt_(other); }) .define_method( "_gt__tensor", *[](Tensor &self, const Tensor &other) { return self.gt_(other); }) .define_method( "_gt_scalar", *[](const Tensor &self, Scalar other) { return self.gt(other); }) .define_method( "_gt_tensor", *[](const Tensor &self, const Tensor &other) { return self.gt(other); }) .define_method( "_hardshrink", *[](const Tensor &self, Scalar lambd) { return self.hardshrink(lambd); }) .define_method( "_histc", *[](const Tensor &self, int64_t bins, Scalar min, Scalar max) { return self.histc(bins, min, max); }) .define_method( "_ifft", *[](const Tensor &self, int64_t signal_ndim, bool normalized) { return self.ifft(signal_ndim, normalized); }) .define_method( "_index_add", *[](const Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) { return self.index_add(dim, index, source); }) .define_method( "_index_add_", *[](Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) { return self.index_add_(dim, index, source); }) .define_method( "_index_copy", *[](const Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) { return self.index_copy(dim, index, source); }) .define_method( "_index_copy_", *[](Tensor &self, int64_t dim, const Tensor &index, const Tensor &source) { return self.index_copy_(dim, index, source); }) .define_method( "_index_fill__scalar", *[](Tensor &self, int64_t dim, const Tensor &index, Scalar value) { return self.index_fill_(dim, index, value); }) .define_method( "_index_fill__tensor", *[](Tensor &self, int64_t dim, const Tensor &index, const Tensor &value) { return self.index_fill_(dim, index, value); }) .define_method( "_index_fill_scalar", *[](const Tensor &self, int64_t dim, const Tensor &index, Scalar value) { return self.index_fill(dim, index, value); }) .define_method( "_index_fill_tensor", *[](const Tensor &self, int64_t dim, const Tensor &index, const Tensor &value) { return self.index_fill(dim, index, value); }) .define_method( "_index_select", *[](const Tensor &self, int64_t dim, const Tensor &index) { return self.index_select(dim, index); }) .define_method( "_indices", *[](Tensor &self) { return self.indices(); }) .define_method( "_int_repr", *[](const Tensor &self) { return self.int_repr(); }) .define_method( "_inverse", *[](const Tensor &self) { return self.inverse(); }) .define_method( "_irfft", *[](const Tensor &self, int64_t signal_ndim, bool normalized, bool onesided, IntArrayRef signal_sizes) { return self.irfft(signal_ndim, normalized, onesided, signal_sizes); }) .define_method( "_is_coalesced", *[](const Tensor &self) { return self.is_coalesced(); }) .define_method( "_is_complex", *[](const Tensor &self) { return self.is_complex(); }) .define_method( "_is_distributed", *[](const Tensor &self) { return self.is_distributed(); }) .define_method( "_is_floating_point", *[](const Tensor &self) { return self.is_floating_point(); }) .define_method( "_is_leaf", *[](const Tensor &self) { return self.is_leaf(); }) .define_method( "_is_nonzero", *[](const Tensor &self) { return self.is_nonzero(); }) .define_method( "_is_pinned", *[](const Tensor &self) { return self.is_pinned(); }) .define_method( "_is_same_size", *[](const Tensor &self, const Tensor &other) { return self.is_same_size(other); }) .define_method( "_is_set_to", *[](const Tensor &self, const Tensor &tensor) { return self.is_set_to(tensor); }) .define_method( "_is_signed", *[](const Tensor &self) { return self.is_signed(); }) .define_method( "_isclose", *[](const Tensor &self, const Tensor &other, double rtol, double atol, bool equal_nan) { return self.isclose(other, rtol, atol, equal_nan); }) .define_method( "_item", *[](const Tensor &self) { return self.item(); }) .define_method( "_kthvalue", *[](const Tensor &self, int64_t k, int64_t dim, bool keepdim) { return wrap(self.kthvalue(k, dim, keepdim)); }) .define_method( "_le__scalar", *[](Tensor &self, Scalar other) { return self.le_(other); }) .define_method( "_le__tensor", *[](Tensor &self, const Tensor &other) { return self.le_(other); }) .define_method( "_le_scalar", *[](const Tensor &self, Scalar other) { return self.le(other); }) .define_method( "_le_tensor", *[](const Tensor &self, const Tensor &other) { return self.le(other); }) .define_method( "_lerp__scalar", *[](Tensor &self, const Tensor &end, Scalar weight) { return self.lerp_(end, weight); }) .define_method( "_lerp__tensor", *[](Tensor &self, const Tensor &end, const Tensor &weight) { return self.lerp_(end, weight); }) .define_method( "_lerp_scalar", *[](const Tensor &self, const Tensor &end, Scalar weight) { return self.lerp(end, weight); }) .define_method( "_lerp_tensor", *[](const Tensor &self, const Tensor &end, const Tensor &weight) { return self.lerp(end, weight); }) .define_method( "_lgamma", *[](const Tensor &self) { return self.lgamma(); }) .define_method( "_lgamma_", *[](Tensor &self) { return self.lgamma_(); }) .define_method( "_log", *[](const Tensor &self) { return self.log(); }) .define_method( "_log10", *[](const Tensor &self) { return self.log10(); }) .define_method( "_log10_", *[](Tensor &self) { return self.log10_(); }) .define_method( "_log1p", *[](const Tensor &self) { return self.log1p(); }) .define_method( "_log1p_", *[](Tensor &self) { return self.log1p_(); }) .define_method( "_log2", *[](const Tensor &self) { return self.log2(); }) .define_method( "_log2_", *[](Tensor &self) { return self.log2_(); }) .define_method( "_log_", *[](Tensor &self) { return self.log_(); }) .define_method( "_log_normal_", *[](Tensor &self, double mean, double std) { return self.log_normal_(mean, std); }) .define_method( "_log_softmax", *[](const Tensor &self, int64_t dim, OptionalScalarType dtype) { return self.log_softmax(dim, dtype); }) .define_method( "_logdet", *[](const Tensor &self) { return self.logdet(); }) .define_method( "_logical_not", *[](const Tensor &self) { return self.logical_not(); }) .define_method( "_logical_not_", *[](Tensor &self) { return self.logical_not_(); }) .define_method( "_logical_xor", *[](const Tensor &self, const Tensor &other) { return self.logical_xor(other); }) .define_method( "_logical_xor_", *[](Tensor &self, const Tensor &other) { return self.logical_xor_(other); }) .define_method( "_logsumexp", *[](const Tensor &self, IntArrayRef dim, bool keepdim) { return self.logsumexp(dim, keepdim); }) .define_method( "_lstsq", *[](const Tensor &self, const Tensor &A) { return wrap(self.lstsq(A)); }) .define_method( "_lt__scalar", *[](Tensor &self, Scalar other) { return self.lt_(other); }) .define_method( "_lt__tensor", *[](Tensor &self, const Tensor &other) { return self.lt_(other); }) .define_method( "_lt_scalar", *[](const Tensor &self, Scalar other) { return self.lt(other); }) .define_method( "_lt_tensor", *[](const Tensor &self, const Tensor &other) { return self.lt(other); }) .define_method( "_lu_solve", *[](const Tensor &self, const Tensor &LU_data, const Tensor &LU_pivots) { return self.lu_solve(LU_data, LU_pivots); }) .define_method( "_masked_fill__scalar", *[](Tensor &self, const Tensor &mask, Scalar value) { return self.masked_fill_(mask, value); }) .define_method( "_masked_fill__tensor", *[](Tensor &self, const Tensor &mask, const Tensor &value) { return self.masked_fill_(mask, value); }) .define_method( "_masked_fill_scalar", *[](const Tensor &self, const Tensor &mask, Scalar value) { return self.masked_fill(mask, value); }) .define_method( "_masked_fill_tensor", *[](const Tensor &self, const Tensor &mask, const Tensor &value) { return self.masked_fill(mask, value); }) .define_method( "_masked_scatter", *[](const Tensor &self, const Tensor &mask, const Tensor &source) { return self.masked_scatter(mask, source); }) .define_method( "_masked_scatter_", *[](Tensor &self, const Tensor &mask, const Tensor &source) { return self.masked_scatter_(mask, source); }) .define_method( "_masked_select", *[](const Tensor &self, const Tensor &mask) { return self.masked_select(mask); }) .define_method( "_matmul", *[](const Tensor &self, const Tensor &other) { return self.matmul(other); }) .define_method( "_matrix_power", *[](const Tensor &self, int64_t n) { return self.matrix_power(n); }) .define_method( "_max", *[](const Tensor &self) { return self.max(); }) .define_method( "_max_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return wrap(self.max(dim, keepdim)); }) .define_method( "_max_other", *[](const Tensor &self, const Tensor &other) { return self.max(other); }) .define_method( "_max_values", *[](const Tensor &self, IntArrayRef dim, bool keepdim) { return self.max_values(dim, keepdim); }) .define_method( "_mean", *[](const Tensor &self, OptionalScalarType dtype) { return self.mean(dtype); }) .define_method( "_mean_dim", *[](const Tensor &self, IntArrayRef dim, bool keepdim, OptionalScalarType dtype) { return self.mean(dim, keepdim, dtype); }) .define_method( "_median", *[](const Tensor &self) { return self.median(); }) .define_method( "_median_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return wrap(self.median(dim, keepdim)); }) .define_method( "_min", *[](const Tensor &self) { return self.min(); }) .define_method( "_min_dim", *[](const Tensor &self, int64_t dim, bool keepdim) { return wrap(self.min(dim, keepdim)); }) .define_method( "_min_other", *[](const Tensor &self, const Tensor &other) { return self.min(other); }) .define_method( "_min_values", *[](const Tensor &self, IntArrayRef dim, bool keepdim) { return self.min_values(dim, keepdim); }) .define_method( "_mm", *[](const Tensor &self, const Tensor &mat2) { return self.mm(mat2); }) .define_method( "_mode", *[](const Tensor &self, int64_t dim, bool keepdim) { return wrap(self.mode(dim, keepdim)); }) .define_method( "_mul__scalar", *[](Tensor &self, Scalar other) { return self.mul_(other); }) .define_method( "_mul__tensor", *[](Tensor &self, const Tensor &other) { return self.mul_(other); }) .define_method( "_mul_scalar", *[](const Tensor &self, Scalar other) { return self.mul(other); }) .define_method( "_mul_tensor", *[](const Tensor &self, const Tensor &other) { return self.mul(other); }) .define_method( "_multinomial", *[](const Tensor &self, int64_t num_samples, bool replacement) { return self.multinomial(num_samples, replacement); }) .define_method( "_mv", *[](const Tensor &self, const Tensor &vec) { return self.mv(vec); }) .define_method( "_mvlgamma", *[](const Tensor &self, int64_t p) { return self.mvlgamma(p); }) .define_method( "_mvlgamma_", *[](Tensor &self, int64_t p) { return self.mvlgamma_(p); }) .define_method( "_narrow", *[](Tensor &self, int64_t dim, int64_t start, int64_t length) { return self.narrow(dim, start, length); }) .define_method( "_narrow_copy", *[](const Tensor &self, int64_t dim, int64_t start, int64_t length) { return self.narrow_copy(dim, start, length); }) .define_method( "_ne__scalar", *[](Tensor &self, Scalar other) { return self.ne_(other); }) .define_method( "_ne__tensor", *[](Tensor &self, const Tensor &other) { return self.ne_(other); }) .define_method( "_ne_scalar", *[](const Tensor &self, Scalar other) { return self.ne(other); }) .define_method( "_ne_tensor", *[](const Tensor &self, const Tensor &other) { return self.ne(other); }) .define_method( "_neg", *[](const Tensor &self) { return self.neg(); }) .define_method( "_neg_", *[](Tensor &self) { return self.neg_(); }) .define_method( "_nonzero", *[](const Tensor &self) { return self.nonzero(); }) .define_method( "_nonzero_numpy", *[](const Tensor &self) { return self.nonzero_numpy(); }) .define_method( "_norm_scalar", *[](const Tensor &self, Scalar p) { return self.norm(p); }) .define_method( "_normal_", *[](Tensor &self, double mean, double std) { return self.normal_(mean, std); }) .define_method( "_numel", *[](const Tensor &self) { return self.numel(); }) .define_method( "_numpy_t", *[](Tensor &self) { return self.numpy_T(); }) .define_method( "_orgqr", *[](const Tensor &self, const Tensor &input2) { return self.orgqr(input2); }) .define_method( "_ormqr", *[](const Tensor &self, const Tensor &input2, const Tensor &input3, bool left, bool transpose) { return self.ormqr(input2, input3, left, transpose); }) .define_method( "_output_nr", *[](const Tensor &self) { return self.output_nr(); }) .define_method( "_permute", *[](Tensor &self, IntArrayRef dims) { return self.permute(dims); }) .define_method( "_pin_memory", *[](const Tensor &self) { return self.pin_memory(); }) .define_method( "_pinverse", *[](const Tensor &self, double rcond) { return self.pinverse(rcond); }) .define_method( "_polygamma", *[](int64_t n, const Tensor &self) { return self.polygamma(n); }) .define_method( "_polygamma_", *[](Tensor &self, int64_t n) { return self.polygamma_(n); }) .define_method( "_pow__scalar", *[](Tensor &self, Scalar exponent) { return self.pow_(exponent); }) .define_method( "_pow__tensor", *[](Tensor &self, const Tensor &exponent) { return self.pow_(exponent); }) .define_method( "_pow_tensor_scalar", *[](const Tensor &self, Scalar exponent) { return self.pow(exponent); }) .define_method( "_pow_tensor_tensor", *[](const Tensor &self, const Tensor &exponent) { return self.pow(exponent); }) .define_method( "_prelu", *[](const Tensor &self, const Tensor &weight) { return self.prelu(weight); }) .define_method( "_prod", *[](const Tensor &self, OptionalScalarType dtype) { return self.prod(dtype); }) .define_method( "_prod_dim_int", *[](const Tensor &self, int64_t dim, bool keepdim, OptionalScalarType dtype) { return self.prod(dim, keepdim, dtype); }) .define_method( "_put_", *[](Tensor &self, const Tensor &index, const Tensor &source, bool accumulate) { return self.put_(index, source, accumulate); }) .define_method( "_q_per_channel_axis", *[](const Tensor &self) { return self.q_per_channel_axis(); }) .define_method( "_q_per_channel_scales", *[](const Tensor &self) { return self.q_per_channel_scales(); }) .define_method( "_q_per_channel_zero_points", *[](const Tensor &self) { return self.q_per_channel_zero_points(); }) .define_method( "_q_scale", *[](const Tensor &self) { return self.q_scale(); }) .define_method( "_q_zero_point", *[](const Tensor &self) { return self.q_zero_point(); }) .define_method( "_qr", *[](const Tensor &self, bool some) { return wrap(self.qr(some)); }) .define_method( "_qscheme", *[](const Tensor &self) { return self.qscheme(); }) .define_method( "_random_", *[](Tensor &self) { return self.random_(); }) .define_method( "_random__from", *[](Tensor &self, int64_t from, int64_t to) { return self.random_(from, to); }) .define_method( "_random__to", *[](Tensor &self, int64_t to) { return self.random_(to); }) .define_method( "_reciprocal", *[](const Tensor &self) { return self.reciprocal(); }) .define_method( "_reciprocal_", *[](Tensor &self) { return self.reciprocal_(); }) .define_method( "_relu", *[](const Tensor &self) { return self.relu(); }) .define_method( "_relu_", *[](Tensor &self) { return self.relu_(); }) .define_method( "_remainder__scalar", *[](Tensor &self, Scalar other) { return self.remainder_(other); }) .define_method( "_remainder__tensor", *[](Tensor &self, const Tensor &other) { return self.remainder_(other); }) .define_method( "_remainder_scalar", *[](const Tensor &self, Scalar other) { return self.remainder(other); }) .define_method( "_remainder_tensor", *[](const Tensor &self, const Tensor &other) { return self.remainder(other); }) .define_method( "_renorm", *[](const Tensor &self, Scalar p, int64_t dim, Scalar maxnorm) { return self.renorm(p, dim, maxnorm); }) .define_method( "_renorm_", *[](Tensor &self, Scalar p, int64_t dim, Scalar maxnorm) { return self.renorm_(p, dim, maxnorm); }) .define_method( "_repeat", *[](const Tensor &self, IntArrayRef repeats) { return self.repeat(repeats); }) .define_method( "_repeat_interleave_self_int", *[](const Tensor &self, int64_t repeats) { return self.repeat_interleave(repeats); }) .define_method( "_repeat_interleave_self_int_dim", *[](const Tensor &self, int64_t repeats, int64_t dim) { return self.repeat_interleave(repeats, dim); }) .define_method( "_repeat_interleave_self_tensor", *[](const Tensor &self, const Tensor &repeats) { return self.repeat_interleave(repeats); }) .define_method( "_repeat_interleave_self_tensor_dim", *[](const Tensor &self, const Tensor &repeats, int64_t dim) { return self.repeat_interleave(repeats, dim); }) .define_method( "_reshape", *[](const Tensor &self, IntArrayRef shape) { return self.reshape(shape); }) .define_method( "_reshape_as", *[](const Tensor &self, const Tensor &other) { return self.reshape_as(other); }) .define_method( "_resize_", *[](Tensor &self, IntArrayRef size) { return self.resize_(size); }) .define_method( "_resize_as_", *[](Tensor &self, const Tensor &the_template) { return self.resize_as_(the_template); }) .define_method( "_rfft", *[](const Tensor &self, int64_t signal_ndim, bool normalized, bool onesided) { return self.rfft(signal_ndim, normalized, onesided); }) .define_method( "_roll", *[](const Tensor &self, IntArrayRef shifts, IntArrayRef dims) { return self.roll(shifts, dims); }) .define_method( "_rot90", *[](const Tensor &self, int64_t k, IntArrayRef dims) { return self.rot90(k, dims); }) .define_method( "_round", *[](const Tensor &self) { return self.round(); }) .define_method( "_round_", *[](Tensor &self) { return self.round_(); }) .define_method( "_rsqrt", *[](const Tensor &self) { return self.rsqrt(); }) .define_method( "_rsqrt_", *[](Tensor &self) { return self.rsqrt_(); }) .define_method( "_scatter__src", *[](Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) { return self.scatter_(dim, index, src); }) .define_method( "_scatter__value", *[](Tensor &self, int64_t dim, const Tensor &index, Scalar value) { return self.scatter_(dim, index, value); }) .define_method( "_scatter_add", *[](const Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) { return self.scatter_add(dim, index, src); }) .define_method( "_scatter_add_", *[](Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) { return self.scatter_add_(dim, index, src); }) .define_method( "_scatter_src", *[](const Tensor &self, int64_t dim, const Tensor &index, const Tensor &src) { return self.scatter(dim, index, src); }) .define_method( "_scatter_value", *[](const Tensor &self, int64_t dim, const Tensor &index, Scalar value) { return self.scatter(dim, index, value); }) .define_method( "_select_int", *[](Tensor &self, int64_t dim, int64_t index) { return self.select(dim, index); }) .define_method( "_set_", *[](Tensor &self) { return self.set_(); }) .define_method( "_set__source_tensor", *[](Tensor &self, const Tensor &source) { return self.set_(source); }) .define_method( "_set_data", *[](Tensor &self, const Tensor &new_data) { return self.set_data(new_data); }) .define_method( "_sigmoid", *[](const Tensor &self) { return self.sigmoid(); }) .define_method( "_sigmoid_", *[](Tensor &self) { return self.sigmoid_(); }) .define_method( "_sign", *[](const Tensor &self) { return self.sign(); }) .define_method( "_sign_", *[](Tensor &self) { return self.sign_(); }) .define_method( "_sin", *[](const Tensor &self) { return self.sin(); }) .define_method( "_sin_", *[](Tensor &self) { return self.sin_(); }) .define_method( "_sinh", *[](const Tensor &self) { return self.sinh(); }) .define_method( "_sinh_", *[](Tensor &self) { return self.sinh_(); }) .define_method( "_size_int", *[](const Tensor &self, int64_t dim) { return self.size(dim); }) .define_method( "_slice_tensor", *[](Tensor &self, int64_t dim, int64_t start, int64_t end, int64_t step) { return self.slice(dim, start, end, step); }) .define_method( "_slogdet", *[](const Tensor &self) { return wrap(self.slogdet()); }) .define_method( "_smm", *[](const Tensor &self, const Tensor &mat2) { return self.smm(mat2); }) .define_method( "_softmax", *[](const Tensor &self, int64_t dim, OptionalScalarType dtype) { return self.softmax(dim, dtype); }) .define_method( "_solve", *[](const Tensor &self, const Tensor &A) { return wrap(self.solve(A)); }) .define_method( "_sort", *[](const Tensor &self, int64_t dim, bool descending) { return wrap(self.sort(dim, descending)); }) .define_method( "_sparse_dim", *[](const Tensor &self) { return self.sparse_dim(); }) .define_method( "_sparse_mask", *[](const Tensor &self, const Tensor &mask) { return self.sparse_mask(mask); }) .define_method( "_sparse_resize_", *[](Tensor &self, IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) { return self.sparse_resize_(size, sparse_dim, dense_dim); }) .define_method( "_sparse_resize_and_clear_", *[](Tensor &self, IntArrayRef size, int64_t sparse_dim, int64_t dense_dim) { return self.sparse_resize_and_clear_(size, sparse_dim, dense_dim); }) .define_method( "_split_tensor", *[](Tensor &self, int64_t split_size, int64_t dim) { return self.split(split_size, dim); }) .define_method( "_split_with_sizes", *[](const Tensor &self, IntArrayRef split_sizes, int64_t dim) { return self.split_with_sizes(split_sizes, dim); }) .define_method( "_sqrt", *[](const Tensor &self) { return self.sqrt(); }) .define_method( "_sqrt_", *[](Tensor &self) { return self.sqrt_(); }) .define_method( "_squeeze", *[](Tensor &self) { return self.squeeze(); }) .define_method( "_squeeze_", *[](Tensor &self) { return self.squeeze_(); }) .define_method( "_squeeze__dim", *[](Tensor &self, int64_t dim) { return self.squeeze_(dim); }) .define_method( "_squeeze_dim", *[](Tensor &self, int64_t dim) { return self.squeeze(dim); }) .define_method( "_sspaddmm", *[](const Tensor &self, const Tensor &mat1, const Tensor &mat2, Scalar beta, Scalar alpha) { return self.sspaddmm(mat1, mat2, beta, alpha); }) .define_method( "_std", *[](const Tensor &self, bool unbiased) { return self.std(unbiased); }) .define_method( "_std_dim", *[](const Tensor &self, IntArrayRef dim, bool unbiased, bool keepdim) { return self.std(dim, unbiased, keepdim); }) .define_method( "_stride_int", *[](const Tensor &self, int64_t dim) { return self.stride(dim); }) .define_method( "_sub__scalar", *[](Tensor &self, Scalar other, Scalar alpha) { return self.sub_(other, alpha); }) .define_method( "_sub__tensor", *[](Tensor &self, const Tensor &other, Scalar alpha) { return self.sub_(other, alpha); }) .define_method( "_sub_scalar", *[](const Tensor &self, Scalar other, Scalar alpha) { return self.sub(other, alpha); }) .define_method( "_sub_tensor", *[](const Tensor &self, const Tensor &other, Scalar alpha) { return self.sub(other, alpha); }) .define_method( "_sum", *[](const Tensor &self, OptionalScalarType dtype) { return self.sum(dtype); }) .define_method( "_sum_dim_intlist", *[](const Tensor &self, IntArrayRef dim, bool keepdim, OptionalScalarType dtype) { return self.sum(dim, keepdim, dtype); }) .define_method( "_sum_to_size", *[](const Tensor &self, IntArrayRef size) { return self.sum_to_size(size); }) .define_method( "_svd", *[](const Tensor &self, bool some, bool compute_uv) { return wrap(self.svd(some, compute_uv)); }) .define_method( "_symeig", *[](const Tensor &self, bool eigenvectors, bool upper) { return wrap(self.symeig(eigenvectors, upper)); }) .define_method( "_t", *[](Tensor &self) { return self.t(); }) .define_method( "_t_", *[](Tensor &self) { return self.t_(); }) .define_method( "_take", *[](const Tensor &self, const Tensor &index) { return self.take(index); }) .define_method( "_tan", *[](const Tensor &self) { return self.tan(); }) .define_method( "_tan_", *[](Tensor &self) { return self.tan_(); }) .define_method( "_tanh", *[](const Tensor &self) { return self.tanh(); }) .define_method( "_tanh_", *[](Tensor &self) { return self.tanh_(); }) .define_method( "_to_dense", *[](const Tensor &self) { return self.to_dense(); }) .define_method( "_to_device", *[](const Tensor &self, Device device, ScalarType dtype, bool non_blocking, bool copy) { return self.to(device, dtype, non_blocking, copy); }) .define_method( "_to_dtype", *[](const Tensor &self, ScalarType dtype, bool non_blocking, bool copy) { return self.to(dtype, non_blocking, copy); }) .define_method( "_to_mkldnn", *[](const Tensor &self) { return self.to_mkldnn(); }) .define_method( "_to_other", *[](const Tensor &self, const Tensor &other, bool non_blocking, bool copy) { return self.to(other, non_blocking, copy); }) .define_method( "_to_sparse", *[](const Tensor &self) { return self.to_sparse(); }) .define_method( "_to_sparse_sparse_dim", *[](const Tensor &self, int64_t sparse_dim) { return self.to_sparse(sparse_dim); }) .define_method( "_topk", *[](const Tensor &self, int64_t k, int64_t dim, bool largest, bool sorted) { return wrap(self.topk(k, dim, largest, sorted)); }) .define_method( "_trace", *[](const Tensor &self) { return self.trace(); }) .define_method( "_transpose_", *[](Tensor &self, int64_t dim0, int64_t dim1) { return self.transpose_(dim0, dim1); }) .define_method( "_transpose_int", *[](Tensor &self, int64_t dim0, int64_t dim1) { return self.transpose(dim0, dim1); }) .define_method( "_triangular_solve", *[](const Tensor &self, const Tensor &A, bool upper, bool transpose, bool unitriangular) { return wrap(self.triangular_solve(A, upper, transpose, unitriangular)); }) .define_method( "_tril", *[](const Tensor &self, int64_t diagonal) { return self.tril(diagonal); }) .define_method( "_tril_", *[](Tensor &self, int64_t diagonal) { return self.tril_(diagonal); }) .define_method( "_triu", *[](const Tensor &self, int64_t diagonal) { return self.triu(diagonal); }) .define_method( "_triu_", *[](Tensor &self, int64_t diagonal) { return self.triu_(diagonal); }) .define_method( "_trunc", *[](const Tensor &self) { return self.trunc(); }) .define_method( "_trunc_", *[](Tensor &self) { return self.trunc_(); }) .define_method( "_type_as", *[](const Tensor &self, const Tensor &other) { return self.type_as(other); }) .define_method( "_unbind_int", *[](Tensor &self, int64_t dim) { return self.unbind(dim); }) .define_method( "_unfold", *[](Tensor &self, int64_t dimension, int64_t size, int64_t step) { return self.unfold(dimension, size, step); }) .define_method( "_uniform_", *[](Tensor &self, double from, double to) { return self.uniform_(from, to); }) .define_method( "_unsqueeze", *[](Tensor &self, int64_t dim) { return self.unsqueeze(dim); }) .define_method( "_unsqueeze_", *[](Tensor &self, int64_t dim) { return self.unsqueeze_(dim); }) .define_method( "_values", *[](Tensor &self) { return self.values(); }) .define_method( "_var", *[](const Tensor &self, bool unbiased) { return self.var(unbiased); }) .define_method( "_var_dim", *[](const Tensor &self, IntArrayRef dim, bool unbiased, bool keepdim) { return self.var(dim, unbiased, keepdim); }) .define_method( "_view", *[](Tensor &self, IntArrayRef size) { return self.view(size); }) .define_method( "_view_as", *[](const Tensor &self, const Tensor &other) { return self.view_as(other); }) .define_method( "_where_self", *[](const Tensor &condition, const Tensor &self, const Tensor &other) { return self.where(condition, other); }) .define_method( "_zero_", *[](Tensor &self) { return self.zero_(); }); }