@Namespace(value="at") @Properties(inherit=torch.class) public class Tensor extends TensorBase
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Tensor() |
Tensor(long size)
Native array allocator.
|
Tensor(Pointer p)
Pointer cast constructor.
|
Tensor(Tensor tensor) |
Tensor(TensorBase base) |
Tensor(TensorImplPtr tensor_impl) |
_base, _is_zerotensor, _set_conj, _set_neg, _set_zero, _version, const_data_ptr, data_ptr_bool, data_ptr_byte, data_ptr_char, data_ptr_double, data_ptr_float, data_ptr_int, data_ptr_long, data_ptr_short, data_ptr, defined, device, dim, dtype, element_size, get_named_tensor_meta, getIntrusivePtr, grad_fn, has_names, has_storage, is_alias_of, is_complex, is_conj, is_contiguous, is_contiguous, is_cpu, is_cuda, is_floating_point, is_hip, is_hpu, is_inference, is_ipu, is_lazy, is_leaf, is_meta, is_metal, is_mkldnn, is_mps, is_mtia, is_neg, is_nested, is_non_overlapping_and_dense, is_ort, is_quantized, is_same, is_signed, is_sparse_csr, is_sparse, is_ve, is_view, is_vulkan, is_xla, is_xpu, itemsize, key_set, layout, mutable_data_ptr, name, names, nbytes, ndimension, numel, opt_names, options, output_nr, print, quantizer, register_hook, register_hook, remove_hook, requires_grad, reset, retain_grad, retains_grad, scalar_type, set_data, share_memory_, size, sizes, storage_offset, storage, stride, strides, suggest_memory_format, suggest_memory_format, sym_nbytes, sym_numel, sym_size, sym_sizes, sym_storage_offset, sym_stride, sym_strides, toString, unsafeGetTensorImpl, unsafeReleaseIntrusivePtr, unsafeReleaseTensorImpl, use_count, weak_use_count
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createBuffer, createBuffer, createIndexer, createIndexer, shape
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Tensor(Pointer p)
Pointer(Pointer)
.public Tensor(long size)
Pointer.position(long)
.public Tensor()
public Tensor(@ByVal TensorImplPtr tensor_impl)
public Tensor(@Const @ByRef TensorBase base)
public Tensor position(long position)
position
in class TensorBase
public Tensor getPointer(long i)
getPointer
in class TensorBase
@ByVal public static Tensor wrap_tensor_impl(@ByVal TensorImplPtr tensor_impl)
@ByVal public Tensor contiguous(torch.MemoryFormat memory_format)
contiguous
in class TensorBase
@ByVal public Tensor contiguous()
contiguous
in class TensorBase
@ByVal public Tensor contiguous(@Cast(value="c10::MemoryFormat") byte memory_format)
contiguous
in class TensorBase
@Cast(value={"","c10::MaybeOwned<at::Tensor>&&"}) @StdMove public TensorMaybeOwned expect_contiguous(torch.MemoryFormat memory_format)
@Cast(value={"","c10::MaybeOwned<at::Tensor>&&"}) @StdMove public TensorMaybeOwned expect_contiguous()
@Cast(value={"","c10::MaybeOwned<at::Tensor>&&"}) @StdMove public TensorMaybeOwned expect_contiguous(@Cast(value="c10::MemoryFormat") byte memory_format)
@ByRef @Name(value="operator =") public Tensor put(@Const @ByRef TensorBase x)
put
in class TensorBase
@ByVal public Tensor toType(torch.ScalarType t)
@ByVal public Tensor toBackend(torch.Backend b)
@ByVal public Tensor index(@ByVal TensorIndexArrayRef indices)
@ByVal public Tensor index(@ByVal TensorIndexVector indices)
@ByRef public Tensor index_put_(@ByVal TensorIndexArrayRef indices, @Const @ByRef Tensor rhs)
@ByRef public Tensor index_put_(@ByVal TensorIndexVector indices, @Const @ByRef Tensor rhs)
@ByRef public Tensor index_put_(@ByVal TensorIndexArrayRef indices, @Const @ByRef Scalar v)
@ByRef public Tensor index_put_(@ByVal TensorIndexVector indices, @Const @ByRef Scalar v)
public void backward(@Const @ByRef(nullValue="at::Tensor{}") Tensor gradient, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional retain_graph, @Cast(value="bool") boolean create_graph, @ByVal(nullValue="c10::optional<at::TensorList>(c10::nullopt)") TensorArrayRefOptional inputs)
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:
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
\fn void backward(const Tensor & gradient={}, c10::optional
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.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.create_graph
- If true, graph of the derivative will
be constructed, allowing to compute higher order derivative
products. Defaults to false.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.public void backward()
@Const @ByRef public Tensor set_requires_grad(@Cast(value="bool") boolean requires_grad)
\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.
set_requires_grad
in class TensorBase
@ByRef public Tensor mutable_grad()
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.@Const @ByRef public Tensor grad()
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.public void __dispatch__backward(@ByVal TensorArrayRef inputs, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional gradient, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional retain_graph, @Cast(value="bool") boolean create_graph)
public void __dispatch__backward(@ByVal TensorArrayRef inputs)
public void __dispatch__backward(@ByVal TensorVector inputs, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional gradient, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional retain_graph, @Cast(value="bool") boolean create_graph)
public void __dispatch__backward(@ByVal TensorVector inputs)
@ByRef public Tensor __dispatch_requires_grad_(@Cast(value="bool") boolean requires_grad)
public void __dispatch_retain_grad()
@ByRef public Tensor rename_(@ByVal DimnameListOptional names)
@ByVal public Tensor rename(@ByVal DimnameListOptional names)
@ByVal public Tensor align_to(@ByVal DimnameArrayRef names)
@ByVal public Tensor align_to(@ByVal DimnameVector names)
@ByVal public Tensor align_to(@ByVal DimnameArrayRef order, @Cast(value="int64_t") long ellipsis_idx)
@ByVal public Tensor align_to(@ByVal DimnameVector order, @Cast(value="int64_t") long ellipsis_idx)
@ByVal public Tensor refine_names(@ByVal DimnameArrayRef names)
@ByVal public Tensor refine_names(@ByVal DimnameVector names)
@ByVal public Tensor chalf(@ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@ByVal public Tensor add(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor add_(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor add(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor add_(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor addmv(@Const @ByRef Tensor mat, @Const @ByRef Tensor vec, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor addmv_(@Const @ByRef Tensor mat, @Const @ByRef Tensor vec, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor addr(@Const @ByRef Tensor vec1, @Const @ByRef Tensor vec2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor addr_(@Const @ByRef Tensor vec1, @Const @ByRef Tensor vec2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@Cast(value="bool") public boolean allclose(@Const @ByRef Tensor other, double rtol, double atol, @Cast(value="bool") boolean equal_nan)
@ByVal public Tensor argmax(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor argmin(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor as_strided(@ByVal LongArrayRef size, @ByVal LongArrayRef stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@ByVal public Tensor as_strided(@ByVal LongArrayRef size, @ByVal LongArrayRef stride)
@ByVal public Tensor as_strided(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@ByVal public Tensor as_strided(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByVal public Tensor as_strided_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional storage_offset)
@ByVal public Tensor as_strided_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride)
@Const @ByRef public Tensor as_strided_(@ByVal LongArrayRef size, @ByVal LongArrayRef stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@Const @ByRef public Tensor as_strided_(@ByVal LongArrayRef size, @ByVal LongArrayRef stride)
@Const @ByRef public Tensor as_strided_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@Const @ByRef public Tensor as_strided_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@Const @ByRef public Tensor as_strided__symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional storage_offset)
@Const @ByRef public Tensor as_strided__symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride)
@ByVal public Tensor baddbmm(@Const @ByRef Tensor batch1, @Const @ByRef Tensor batch2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor baddbmm_(@Const @ByRef Tensor batch1, @Const @ByRef Tensor batch2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor bernoulli(@ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor bernoulli_(@Const @ByRef Tensor p, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor bernoulli_(double p, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByVal public Tensor bernoulli(double p, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByVal public Tensor bincount(@Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional weights, @Cast(value="int64_t") long minlength)
@ByVal public Tensor broadcast_to(@ByVal LongArrayRef size)
@ByVal public Tensor broadcast_to(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor broadcast_to_symint(@ByVal SymIntArrayRef size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_chunk(@Cast(value="int64_t") long chunks, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_chunk(@Cast(value="int64_t") long chunks)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector chunk(@Cast(value="int64_t") long chunks, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector chunk(@Cast(value="int64_t") long chunks)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@Cast(value="int64_t") long sections, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@Cast(value="int64_t") long sections)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split_symint(@ByVal SymInt sections, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split_symint(@ByVal SymInt sections)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@ByVal LongArrayRef indices, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@ByVal LongArrayRef indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] indices, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split_symint(@ByVal SymIntArrayRef indices, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split_symint(@ByVal SymIntArrayRef indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@Const @ByRef Tensor tensor_indices_or_sections, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector tensor_split(@Const @ByRef Tensor tensor_indices_or_sections)
@ByVal public Tensor clamp(@Const @ByRef ScalarOptional min, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional max)
@ByVal public Tensor clamp(@Const @ByRef ScalarOptional min)
@ByVal public Tensor clamp(@Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional min, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional max)
@ByRef public Tensor clamp_(@Const @ByRef ScalarOptional min, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional max)
@ByRef public Tensor clamp_(@Const @ByRef ScalarOptional min)
@ByRef public Tensor clamp_(@Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional min, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional max)
@ByVal public Tensor clip(@Const @ByRef ScalarOptional min, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional max)
@ByVal public Tensor clip(@Const @ByRef ScalarOptional min)
@ByVal public Tensor clip(@Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional min, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional max)
@ByRef public Tensor clip_(@Const @ByRef ScalarOptional min, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional max)
@ByRef public Tensor clip_(@Const @ByRef ScalarOptional min)
@ByRef public Tensor clip_(@Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional min, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional max)
@ByVal public Tensor __dispatch_contiguous(@ByVal(nullValue="at::MemoryFormat(c10::MemoryFormat::Contiguous)") torch.MemoryFormat memory_format)
@ByRef public Tensor copy_(@Const @ByRef Tensor src, @Cast(value="bool") boolean non_blocking)
@ByVal public Tensor count_nonzero(@ByVal LongArrayRef dim)
@ByVal public Tensor count_nonzero(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dim)
@ByVal public Tensor count_nonzero(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim)
@ByVal public Tensor cov(@Cast(value="int64_t") long correction, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional fweights, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional aweights)
@ByVal public T_TensorTensor_T cummax(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T cummax(@ByVal Dimname dim)
@ByVal public T_TensorTensor_T cummin(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T cummin(@ByVal Dimname dim)
@ByVal public Tensor cumprod(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByRef public Tensor cumprod_(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor cumprod(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByRef public Tensor cumprod_(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor cumsum(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByRef public Tensor cumsum_(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor cumsum(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByRef public Tensor cumsum_(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor diag_embed(@Cast(value="int64_t") long offset, @Cast(value="int64_t") long dim1, @Cast(value="int64_t") long dim2)
@ByVal public Tensor diagonal(@Cast(value="int64_t") long offset, @Cast(value="int64_t") long dim1, @Cast(value="int64_t") long dim2)
@ByVal public Tensor diagonal(@ByVal Dimname outdim, @ByVal Dimname dim1, @ByVal Dimname dim2, @Cast(value="int64_t") long offset)
@ByVal public Tensor diagonal(@ByVal Dimname outdim, @ByVal Dimname dim1, @ByVal Dimname dim2)
@ByRef public Tensor fill_diagonal_(@Const @ByRef Scalar fill_value, @Cast(value="bool") boolean wrap)
@ByVal public Tensor diff(@Cast(value="int64_t") long n, @Cast(value="int64_t") long dim, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional prepend, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional append)
@ByVal public Tensor divide(@Const @ByRef Tensor other, @ByVal StringViewOptional rounding_mode)
@ByRef public Tensor divide_(@Const @ByRef Tensor other, @ByVal StringViewOptional rounding_mode)
@ByVal public Tensor divide(@Const @ByRef Scalar other, @ByVal StringViewOptional rounding_mode)
@ByRef public Tensor divide_(@Const @ByRef Scalar other, @ByVal StringViewOptional rounding_mode)
@ByVal public Tensor new_empty(@ByVal LongArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty(@ByVal LongArrayRef size)
@ByVal public Tensor new_empty(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor new_empty(@ByVal LongArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_empty(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_empty_symint(@ByVal SymIntArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor new_empty_symint(@ByVal SymIntArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_empty_strided(@ByVal LongArrayRef size, @ByVal LongArrayRef stride, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty_strided(@ByVal LongArrayRef size, @ByVal LongArrayRef stride)
@ByVal public Tensor new_empty_strided(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] stride, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty_strided(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByVal public Tensor new_empty_strided(@ByVal LongArrayRef size, @ByVal LongArrayRef stride, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_empty_strided(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] stride, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_empty_strided_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_empty_strided_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride)
@ByVal public Tensor new_empty_strided_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_full(@ByVal LongArrayRef size, @Const @ByRef Scalar fill_value, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_full(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Const @ByRef Scalar fill_value, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_full(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Const @ByRef Scalar fill_value)
@ByVal public Tensor new_full(@ByVal LongArrayRef size, @Const @ByRef Scalar fill_value, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_full(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Const @ByRef Scalar fill_value, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_full_symint(@ByVal SymIntArrayRef size, @Const @ByRef Scalar fill_value, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_full_symint(@ByVal SymIntArrayRef size, @Const @ByRef Scalar fill_value)
@ByVal public Tensor new_full_symint(@ByVal SymIntArrayRef size, @Const @ByRef Scalar fill_value, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_zeros(@ByVal LongArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_zeros(@ByVal LongArrayRef size)
@ByVal public Tensor new_zeros(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_zeros(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor new_zeros(@ByVal LongArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_zeros(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_zeros_symint(@ByVal SymIntArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_zeros_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor new_zeros_symint(@ByVal SymIntArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_ones(@ByVal LongArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_ones(@ByVal LongArrayRef size)
@ByVal public Tensor new_ones(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_ones(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor new_ones(@ByVal LongArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_ones(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@ByVal public Tensor new_ones_symint(@ByVal SymIntArrayRef size, @ByVal(nullValue="at::TensorOptions{}") TensorOptions options)
@ByVal public Tensor new_ones_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor new_ones_symint(@ByVal SymIntArrayRef size, @ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory)
@Const @ByRef public Tensor resize_(@ByVal LongArrayRef size, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@Const @ByRef public Tensor resize_(@ByVal LongArrayRef size)
@Const @ByRef public Tensor resize_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@Const @ByRef public Tensor resize_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@Const @ByRef public Tensor resize__symint(@ByVal SymIntArrayRef size, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@Const @ByRef public Tensor resize__symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor expand(@ByVal LongArrayRef size)
@ByVal public Tensor expand(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Cast(value="bool") boolean implicit)
@ByVal public Tensor expand(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor expand_symint(@ByVal SymIntArrayRef size, @Cast(value="bool") boolean implicit)
@ByVal public Tensor expand_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor flatten(@Cast(value="int64_t") long start_dim, @Cast(value="int64_t") long end_dim)
@ByVal public Tensor flatten(@Cast(value="int64_t") long start_dim, @Cast(value="int64_t") long end_dim, @ByVal Dimname out_dim)
@ByVal public Tensor flatten(@ByVal Dimname start_dim, @ByVal Dimname end_dim, @ByVal Dimname out_dim)
@ByVal public Tensor unflatten(@Cast(value="int64_t") long dim, @ByVal LongArrayRef sizes)
@ByVal public Tensor unflatten(@Cast(value="int64_t") long dim, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... sizes)
@ByVal public Tensor unflatten_symint(@Cast(value="int64_t") long dim, @ByVal SymIntArrayRef sizes)
@ByVal public Tensor unflatten(@ByVal Dimname dim, @ByVal LongArrayRef sizes, @ByVal DimnameArrayRef names)
@ByVal public Tensor unflatten(@ByVal Dimname dim, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] sizes, @ByVal DimnameVector names)
@ByVal public Tensor unflatten_symint(@ByVal Dimname dim, @ByVal SymIntArrayRef sizes, @ByVal DimnameArrayRef names)
@ByVal public Tensor unflatten_symint(@ByVal Dimname dim, @ByVal SymIntArrayRef sizes, @ByVal DimnameVector names)
@ByRef public Tensor fill_(@Const @ByRef Scalar value)
TensorBase
fill_
in class TensorBase
@ByVal public Tensor index(@Const @ByRef TensorOptionalList indices)
@ByRef public Tensor index_copy_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByVal public Tensor index_copy(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByRef public Tensor index_copy_(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByVal public Tensor index_copy(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByRef public Tensor index_put_(@Const @ByRef TensorOptionalList indices, @Const @ByRef Tensor values, @Cast(value="bool") boolean accumulate)
@ByRef public Tensor index_put_(@Const @ByRef TensorOptionalList indices, @Const @ByRef Tensor values)
@ByVal public Tensor index_put(@Const @ByRef TensorOptionalList indices, @Const @ByRef Tensor values, @Cast(value="bool") boolean accumulate)
@ByVal public Tensor index_put(@Const @ByRef TensorOptionalList indices, @Const @ByRef Tensor values)
@ByVal public Tensor isclose(@Const @ByRef Tensor other, double rtol, double atol, @Cast(value="bool") boolean equal_nan)
@ByVal public T_TensorTensor_T kthvalue(@Cast(value="int64_t") long k, @Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T kthvalue(@Cast(value="int64_t") long k)
@ByVal public T_TensorTensor_T kthvalue(@Cast(value="int64_t") long k, @ByVal Dimname dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor nan_to_num(@ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional nan, @ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional posinf, @ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional neginf)
@ByRef public Tensor nan_to_num_(@ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional nan, @ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional posinf, @ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional neginf)
@ByVal public Tensor log_softmax(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor log_softmax(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor logsumexp(@ByVal LongArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor logsumexp(@ByVal LongArrayRef dim)
@ByVal public Tensor logsumexp(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor logsumexp(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dim)
@ByVal public Tensor logsumexp(@ByVal DimnameArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor logsumexp(@ByVal DimnameArrayRef dim)
@ByVal public Tensor logsumexp(@ByVal DimnameVector dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor logsumexp(@ByVal DimnameVector dim)
@ByVal public T_TensorTensor_T aminmax(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T aminmax()
@ByVal public T_TensorTensor_T max(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T max(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T max(@ByVal Dimname dim)
@ByVal public Tensor amax(@ByVal(nullValue="at::IntArrayRef{}") LongArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor amax(@ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor mean(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor mean(@ByVal LongArrayRefOptional dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor mean(@ByVal LongArrayRefOptional dim)
@ByVal public Tensor mean(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor mean(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long... dim)
@ByVal public Tensor mean(@ByVal DimnameArrayRef dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor mean(@ByVal DimnameArrayRef dim)
@ByVal public Tensor mean(@ByVal DimnameVector dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor mean(@ByVal DimnameVector dim)
@ByVal public Tensor nanmean(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor nanmean(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public T_TensorTensor_T median(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T median(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T median(@ByVal Dimname dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T median(@ByVal Dimname dim)
@ByVal public T_TensorTensor_T nanmedian(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T nanmedian(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T nanmedian(@ByVal Dimname dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T nanmedian(@ByVal Dimname dim)
@ByVal public T_TensorTensor_T min(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T min(@Cast(value="int64_t") long dim)
@ByVal public T_TensorTensor_T min(@ByVal Dimname dim)
@ByVal public Tensor amin(@ByVal(nullValue="at::IntArrayRef{}") LongArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor amin(@ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T mode(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim)
@ByVal public T_TensorTensor_T mode()
@ByVal public T_TensorTensor_T mode(@ByVal Dimname dim)
@ByVal public Tensor narrow_copy(@Cast(value="int64_t") long dim, @Cast(value="int64_t") long start, @Cast(value="int64_t") long length)
@ByVal public Tensor narrow_copy_symint(@Cast(value="int64_t") long dim, @ByVal SymInt start, @ByVal SymInt length)
@ByVal public Tensor narrow(@Cast(value="int64_t") long dim, @Cast(value="int64_t") long start, @Cast(value="int64_t") long length)
@ByVal public Tensor narrow_symint(@Cast(value="int64_t") long dim, @ByVal SymInt start, @ByVal SymInt length)
@ByVal public Tensor narrow(@Cast(value="int64_t") long dim, @Const @ByRef Tensor start, @Cast(value="int64_t") long length)
@ByVal public Tensor narrow_symint(@Cast(value="int64_t") long dim, @Const @ByRef Tensor start, @ByVal SymInt length)
@ByVal public Tensor permute(@ByVal LongArrayRef dims)
@ByVal public Tensor permute(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor movedim(@ByVal LongArrayRef source, @ByVal LongArrayRef destination)
@ByVal public Tensor movedim(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] source, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... destination)
@ByVal public Tensor movedim(@Cast(value="int64_t") long source, @Cast(value="int64_t") long destination)
@ByVal public Tensor moveaxis(@ByVal LongArrayRef source, @ByVal LongArrayRef destination)
@ByVal public Tensor moveaxis(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] source, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... destination)
@ByVal public Tensor moveaxis(@Cast(value="int64_t") long source, @Cast(value="int64_t") long destination)
@Cast(value="bool") public boolean is_pinned(@ByVal(nullValue="c10::optional<at::Device>(c10::nullopt)") DeviceOptional device)
@ByVal public Tensor pin_memory(@ByVal(nullValue="c10::optional<at::Device>(c10::nullopt)") DeviceOptional device)
@ByVal public Tensor repeat(@ByVal LongArrayRef repeats)
@ByVal public Tensor repeat(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... repeats)
@ByVal public Tensor repeat_symint(@ByVal SymIntArrayRef repeats)
@ByVal public Tensor repeat_interleave(@Const @ByRef Tensor repeats, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional output_size)
@ByVal public Tensor repeat_interleave(@Cast(value="int64_t") long repeats, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional output_size)
@ByVal public Tensor repeat_interleave_symint(@ByVal SymInt repeats, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional output_size)
@ByVal public Tensor reshape(@ByVal LongArrayRef shape)
@ByVal public Tensor reshape(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... shape)
@ByVal public Tensor reshape_symint(@ByVal SymIntArrayRef shape)
@ByVal public Tensor _reshape_alias(@ByVal LongArrayRef size, @ByVal LongArrayRef stride)
@ByVal public Tensor _reshape_alias(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByVal public Tensor _reshape_alias_symint(@ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride)
@ByVal public Tensor hardshrink_backward(@Const @ByRef Tensor grad_out, @Const @ByRef Scalar lambd)
@ByVal public Tensor select(@Cast(value="int64_t") long dim, @Cast(value="int64_t") long index)
@ByVal public Tensor select_symint(@Cast(value="int64_t") long dim, @ByVal SymInt index)
@ByVal public Tensor logit(@ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional eps)
@ByRef public Tensor logit_(@ByVal(nullValue="c10::optional<double>(c10::nullopt)") DoubleOptional eps)
@ByVal public Tensor slice(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional start, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional end, @Cast(value="int64_t") long step)
@ByVal public Tensor slice_symint(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional start, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional end, @ByVal(nullValue="c10::SymInt(1)") SymInt step)
@ByVal public Tensor slice_scatter(@Const @ByRef Tensor src, @Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional start, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional end, @Cast(value="int64_t") long step)
@ByVal public Tensor slice_scatter_symint(@Const @ByRef Tensor src, @Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional start, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional end, @ByVal(nullValue="c10::SymInt(1)") SymInt step)
@ByVal public Tensor select_scatter(@Const @ByRef Tensor src, @Cast(value="int64_t") long dim, @Cast(value="int64_t") long index)
@ByVal public Tensor select_scatter_symint(@Const @ByRef Tensor src, @Cast(value="int64_t") long dim, @ByVal SymInt index)
@ByVal public Tensor diagonal_scatter(@Const @ByRef Tensor src, @Cast(value="int64_t") long offset, @Cast(value="int64_t") long dim1, @Cast(value="int64_t") long dim2)
@ByVal public Tensor as_strided_scatter(@Const @ByRef Tensor src, @ByVal LongArrayRef size, @ByVal LongArrayRef stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@ByVal public Tensor as_strided_scatter(@Const @ByRef Tensor src, @ByVal LongArrayRef size, @ByVal LongArrayRef stride)
@ByVal public Tensor as_strided_scatter(@Const @ByRef Tensor src, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] stride, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional storage_offset)
@ByVal public Tensor as_strided_scatter(@Const @ByRef Tensor src, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByVal public Tensor as_strided_scatter_symint(@Const @ByRef Tensor src, @ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride, @ByVal(nullValue="c10::optional<c10::SymInt>(c10::nullopt)") SymIntOptional storage_offset)
@ByVal public Tensor as_strided_scatter_symint(@Const @ByRef Tensor src, @ByVal SymIntArrayRef size, @ByVal SymIntArrayRef stride)
@ByVal public Tensor softmax(@Cast(value="int64_t") long dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor softmax(@ByVal Dimname dim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split(@Cast(value="int64_t") long split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split(@Cast(value="int64_t") long split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_symint(@ByVal SymInt split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_symint(@ByVal SymInt split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@Cast(value="int64_t") long split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@Cast(value="int64_t") long split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_symint(@ByVal SymInt split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_symint(@ByVal SymInt split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@ByVal LongArrayRef split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@ByVal LongArrayRef split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_symint(@ByVal SymIntArrayRef split_size, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_symint(@ByVal SymIntArrayRef split_size)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes(@ByVal LongArrayRef split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes(@ByVal LongArrayRef split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes_symint(@ByVal SymIntArrayRef split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unsafe_split_with_sizes_symint(@ByVal SymIntArrayRef split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes(@ByVal LongArrayRef split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes(@ByVal LongArrayRef split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes_symint(@ByVal SymIntArrayRef split_sizes, @Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector split_with_sizes_symint(@ByVal SymIntArrayRef split_sizes)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector hsplit(@Cast(value="int64_t") long sections)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector hsplit(@ByVal LongArrayRef indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector hsplit(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector vsplit(@Cast(value="int64_t") long sections)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector vsplit(@ByVal LongArrayRef indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector vsplit(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector dsplit(@Cast(value="int64_t") long sections)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector dsplit(@ByVal LongArrayRef indices)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector dsplit(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... indices)
@ByVal public Tensor squeeze(@ByVal LongArrayRef dim)
@ByVal public Tensor squeeze(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dim)
@ByRef public Tensor squeeze_(@ByVal LongArrayRef dim)
@ByRef public Tensor squeeze_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dim)
@ByVal public Tensor sspaddmm(@Const @ByRef Tensor mat1, @Const @ByRef Tensor mat2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor stft(@Cast(value="int64_t") long n_fft, @ByVal LongOptional hop_length, @ByVal LongOptional win_length, @Const @ByRef TensorOptional window, @Cast(value="bool") boolean normalized, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional onesided, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional return_complex)
@ByVal public Tensor stft(@Cast(value="int64_t") long n_fft, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional hop_length, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional win_length, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional window, @Cast(value="bool") boolean center, @StringView BytePointer pad_mode, @Cast(value="bool") boolean normalized, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional onesided, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional return_complex)
@ByVal public Tensor stft(@Cast(value="int64_t") long n_fft, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional hop_length, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional win_length, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional window, @Cast(value="bool") boolean center, @StringView String pad_mode, @Cast(value="bool") boolean normalized, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional onesided, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional return_complex)
@ByVal public Tensor istft(@Cast(value="int64_t") long n_fft, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional hop_length, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional win_length, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional window, @Cast(value="bool") boolean center, @Cast(value="bool") boolean normalized, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional onesided, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional length, @Cast(value="bool") boolean return_complex)
@ByVal public Tensor sum(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum(@ByVal LongArrayRefOptional dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum(@ByVal LongArrayRefOptional dim)
@ByVal public Tensor sum(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long... dim)
@ByVal public Tensor sum(@ByVal DimnameArrayRef dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum(@ByVal DimnameArrayRef dim)
@ByVal public Tensor sum(@ByVal DimnameVector dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum(@ByVal DimnameVector dim)
@ByVal public Tensor nansum(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor nansum(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor sum_to_size(@ByVal LongArrayRef size)
@ByVal public Tensor sum_to_size(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor sum_to_size_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor std(@ByVal LongArrayRefOptional dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean unbiased)
@ByVal public Tensor std(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal DimnameArrayRef dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal DimnameVector dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal DimnameArrayRef dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal DimnameArrayRef dim)
@ByVal public Tensor std(@ByVal DimnameVector dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor std(@ByVal DimnameVector dim)
@ByVal public Tensor prod(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor prod(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor prod(@ByVal Dimname dim, @Cast(value="bool") boolean keepdim, @ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
@ByVal public Tensor tile(@ByVal LongArrayRef dims)
@ByVal public Tensor tile(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor tile_symint(@ByVal SymIntArrayRef dims)
@ByVal public Tensor transpose(@Cast(value="int64_t") long dim0, @Cast(value="int64_t") long dim1)
@ByRef public Tensor transpose_(@Cast(value="int64_t") long dim0, @Cast(value="int64_t") long dim1)
@ByVal public Tensor flip(@ByVal LongArrayRef dims)
@ByVal public Tensor flip(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor roll(@ByVal LongArrayRef shifts, @ByVal(nullValue="at::IntArrayRef{}") LongArrayRef dims)
@ByVal public Tensor roll(@ByVal LongArrayRef shifts)
@ByVal public Tensor roll(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] shifts, @ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor roll(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... shifts)
@ByVal public Tensor roll_symint(@ByVal SymIntArrayRef shifts, @ByVal(nullValue="at::IntArrayRef{}") LongArrayRef dims)
@ByVal public Tensor roll_symint(@ByVal SymIntArrayRef shifts)
@ByVal public Tensor roll_symint(@ByVal SymIntArrayRef shifts, @ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor rot90(@Cast(value="int64_t") long k, @ByVal(nullValue="at::IntArrayRef({0,1})") LongArrayRef dims)
@ByVal public Tensor rot90(@Cast(value="int64_t") long k, @ByVal(nullValue="at::IntArrayRef({0,1})") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dims)
@ByVal public Tensor var(@ByVal LongArrayRefOptional dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Cast(value="bool") boolean unbiased)
@ByVal public Tensor var(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal DimnameArrayRef dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal DimnameVector dim, @Cast(value="bool") boolean unbiased, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal DimnameArrayRef dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal DimnameArrayRef dim)
@ByVal public Tensor var(@ByVal DimnameVector dim, @Const @ByRef(nullValue="c10::optional<at::Scalar>(c10::nullopt)") ScalarOptional correction, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor var(@ByVal DimnameVector dim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, torch.ScalarType dtype)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal LongArrayRef dim, @Cast(value="bool") boolean keepdim, torch.ScalarType dtype)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] dim, @Cast(value="bool") boolean keepdim, torch.ScalarType dtype)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal LongArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal LongArrayRef dim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... dim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameArrayRef dim, @Cast(value="bool") boolean keepdim, torch.ScalarType dtype)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameVector dim, @Cast(value="bool") boolean keepdim, torch.ScalarType dtype)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameArrayRef dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameArrayRef dim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameVector dim, @Cast(value="bool") boolean keepdim)
@ByVal public Tensor norm(@Const @ByRef ScalarOptional p, @ByVal DimnameVector dim)
@ByVal public T_TensorTensor_T frexp()
@ByVal public Tensor clone(@ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@Const @ByRef public Tensor resize_as_(@Const @ByRef Tensor the_template, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@ByRef public Tensor zero_()
zero_
in class TensorBase
@ByVal public Tensor sub(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor sub_(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor sub(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor sub_(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor subtract(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor subtract_(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor subtract(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor subtract_(@Const @ByRef Scalar other, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor addmm(@Const @ByRef Tensor mat1, @Const @ByRef Tensor mat2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor addmm_(@Const @ByRef Tensor mat1, @Const @ByRef Tensor mat2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor _addmm_activation(@Const @ByRef Tensor mat1, @Const @ByRef Tensor mat2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha, @Cast(value="bool") boolean use_gelu)
@ByVal public Tensor _addmm_activation(@Const @ByRef Tensor mat1, @Const @ByRef Tensor mat2)
@Const @ByRef public Tensor sparse_resize_(@ByVal LongArrayRef size, @Cast(value="int64_t") long sparse_dim, @Cast(value="int64_t") long dense_dim)
@Const @ByRef public Tensor sparse_resize_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Cast(value="int64_t") long sparse_dim, @Cast(value="int64_t") long dense_dim)
@Const @ByRef public Tensor sparse_resize_and_clear_(@ByVal LongArrayRef size, @Cast(value="int64_t") long sparse_dim, @Cast(value="int64_t") long dense_dim)
@Const @ByRef public Tensor sparse_resize_and_clear_(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @Cast(value="int64_t") long sparse_dim, @Cast(value="int64_t") long dense_dim)
@ByVal public Tensor _sparse_mask_projection(@Const @ByRef Tensor mask, @Cast(value="bool") boolean accumulate_matches)
@ByVal public Tensor to_dense(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional masked_grad)
@ByVal public Tensor _to_dense(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype, @ByVal(nullValue="c10::optional<bool>(c10::nullopt)") BoolOptional masked_grad)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unbind(@Cast(value="int64_t") long dim)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unbind()
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector unbind(@ByVal Dimname dim)
@ByVal public Tensor to_sparse(@ByVal(nullValue="c10::optional<at::Layout>(c10::nullopt)") LayoutOptional layout, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse(@ByVal(nullValue="c10::optional<at::Layout>(c10::nullopt)") LayoutOptional layout, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse(@ByVal(nullValue="c10::optional<at::Layout>(c10::nullopt)") LayoutOptional layout, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse(@ByVal(nullValue="c10::optional<at::Layout>(c10::nullopt)") LayoutOptional layout, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_csr(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_csr(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_csc(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_csc(@ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_bsr(@ByVal LongArrayRef blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_bsr(@ByVal LongArrayRef blocksize)
@ByVal public Tensor to_sparse_bsr(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_bsr(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... blocksize)
@ByVal public Tensor _to_sparse_bsr(@ByVal LongArrayRef blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_bsr(@ByVal LongArrayRef blocksize)
@ByVal public Tensor _to_sparse_bsr(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_bsr(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... blocksize)
@ByVal public Tensor to_sparse_bsc(@ByVal LongArrayRef blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_bsc(@ByVal LongArrayRef blocksize)
@ByVal public Tensor to_sparse_bsc(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor to_sparse_bsc(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... blocksize)
@ByVal public Tensor _to_sparse_bsc(@ByVal LongArrayRef blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_bsc(@ByVal LongArrayRef blocksize)
@ByVal public Tensor _to_sparse_bsc(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] blocksize, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dense_dim)
@ByVal public Tensor _to_sparse_bsc(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... blocksize)
@ByVal public Tensor to_mkldnn(@ByVal(nullValue="c10::optional<at::ScalarType>(c10::nullopt)") ScalarTypeOptional dtype)
public double q_scale()
@ByVal public torch.QScheme qscheme()
@ByVal public Tensor _autocast_to_reduced_precision(@Cast(value="bool") boolean cuda_enabled, @Cast(value="bool") boolean cpu_enabled, torch.ScalarType cuda_dtype, torch.ScalarType cpu_dtype)
@ByVal public Tensor _autocast_to_full_precision(@Cast(value="bool") boolean cuda_enabled, @Cast(value="bool") boolean cpu_enabled)
@ByVal public Tensor to(@ByVal(nullValue="at::TensorOptions{}") TensorOptions options, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
to
in class TensorBase
@ByVal public Tensor to()
to
in class TensorBase
@ByVal public Tensor to(@ByVal ScalarTypeOptional dtype, @ByVal LayoutOptional layout, @ByVal DeviceOptional device, @ByVal BoolOptional pin_memory, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy, @ByVal MemoryFormatOptional memory_format)
@ByVal public Tensor to(@ByVal Device device, torch.ScalarType dtype, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@ByVal public Tensor to(@ByVal Device device, torch.ScalarType dtype)
@ByVal public Tensor to(torch.ScalarType dtype, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@ByVal public Tensor to(torch.ScalarType dtype)
@ByVal public Tensor to(@Const @ByRef Tensor other, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy, @ByVal(nullValue="c10::optional<at::MemoryFormat>(c10::nullopt)") MemoryFormatOptional memory_format)
@ByRef public Tensor set_(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @Cast(value="int64_t") long storage_offset, @ByVal LongArrayRef size, @ByVal(nullValue="at::IntArrayRef{}") LongArrayRef stride)
@ByRef public Tensor set_(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @Cast(value="int64_t") long storage_offset, @ByVal LongArrayRef size)
@ByRef public Tensor set_(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @Cast(value="int64_t") long storage_offset, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByRef public Tensor set_(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @Cast(value="int64_t") long storage_offset, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByRef public Tensor set__symint(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @ByVal SymInt storage_offset, @ByVal SymIntArrayRef size, @ByVal(nullValue="c10::SymIntArrayRef{}") SymIntArrayRef stride)
@ByRef public Tensor set__symint(@Cast(value={"","c10::Storage&&"}) @StdMove Storage source, @ByVal SymInt storage_offset, @ByVal SymIntArrayRef size)
@ByRef public Tensor set_(@Const @ByRef Tensor source, @Cast(value="int64_t") long storage_offset, @ByVal LongArrayRef size, @ByVal(nullValue="at::IntArrayRef{}") LongArrayRef stride)
@ByRef public Tensor set_(@Const @ByRef Tensor source, @Cast(value="int64_t") long storage_offset, @ByVal LongArrayRef size)
@ByRef public Tensor set_(@Const @ByRef Tensor source, @Cast(value="int64_t") long storage_offset, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long[] size, @ByVal(nullValue="at::IntArrayRef{}") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... stride)
@ByRef public Tensor set_(@Const @ByRef Tensor source, @Cast(value="int64_t") long storage_offset, @ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByRef public Tensor set__symint(@Const @ByRef Tensor source, @ByVal SymInt storage_offset, @ByVal SymIntArrayRef size, @ByVal(nullValue="c10::SymIntArrayRef{}") SymIntArrayRef stride)
@ByRef public Tensor set__symint(@Const @ByRef Tensor source, @ByVal SymInt storage_offset, @ByVal SymIntArrayRef size)
@ByRef public Tensor masked_fill_(@Const @ByRef Tensor mask, @Const @ByRef Scalar value)
@ByRef public Tensor masked_fill_(@Const @ByRef Tensor mask, @Const @ByRef Tensor value)
@ByRef public Tensor masked_scatter_(@Const @ByRef Tensor mask, @Const @ByRef Tensor source)
@ByVal public Tensor masked_scatter(@Const @ByRef Tensor mask, @Const @ByRef Tensor source)
@ByVal public Tensor view(@ByVal LongArrayRef size)
@ByVal public Tensor view(@ByVal @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector(value="int64_t") long... size)
@ByVal public Tensor view_symint(@ByVal SymIntArrayRef size)
@ByVal public Tensor view(torch.ScalarType dtype)
@ByRef public Tensor put_(@Const @ByRef Tensor index, @Const @ByRef Tensor source, @Cast(value="bool") boolean accumulate)
@ByVal public Tensor put(@Const @ByRef Tensor index, @Const @ByRef Tensor source, @Cast(value="bool") boolean accumulate)
@ByRef public Tensor index_add_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor index_add_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByVal public Tensor index_add(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor index_add(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByVal public Tensor index_add(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor index_add(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source)
@ByRef public Tensor index_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView BytePointer reduce, @Cast(value="bool") boolean include_self)
@ByRef public Tensor index_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView BytePointer reduce)
@ByRef public Tensor index_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView String reduce, @Cast(value="bool") boolean include_self)
@ByRef public Tensor index_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView String reduce)
@ByVal public Tensor index_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView BytePointer reduce, @Cast(value="bool") boolean include_self)
@ByVal public Tensor index_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView BytePointer reduce)
@ByVal public Tensor index_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView String reduce, @Cast(value="bool") boolean include_self)
@ByVal public Tensor index_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor source, @StringView String reduce)
@ByRef public Tensor index_fill_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByVal public Tensor index_fill(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByRef public Tensor index_fill_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor value)
@ByVal public Tensor index_fill(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor value)
@ByRef public Tensor index_fill_(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByRef public Tensor index_fill_(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor value)
@ByVal public Tensor index_fill(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByVal public Tensor index_fill(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor value)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value, @StringView BytePointer reduce)
@ByVal public Tensor scatter(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value, @StringView String reduce)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value, @StringView BytePointer reduce)
@ByRef public Tensor scatter_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value, @StringView String reduce)
@ByVal public Tensor scatter(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByVal public Tensor scatter(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Scalar value)
@ByVal public Tensor scatter_add(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByRef public Tensor scatter_add_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByVal public Tensor scatter_add(@ByVal Dimname dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src)
@ByVal public Tensor scatter_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce, @Cast(value="bool") boolean include_self)
@ByVal public Tensor scatter_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce)
@ByVal public Tensor scatter_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce, @Cast(value="bool") boolean include_self)
@ByVal public Tensor scatter_reduce(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce)
@ByRef public Tensor scatter_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce, @Cast(value="bool") boolean include_self)
@ByRef public Tensor scatter_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView BytePointer reduce)
@ByRef public Tensor scatter_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce, @Cast(value="bool") boolean include_self)
@ByRef public Tensor scatter_reduce_(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Const @ByRef Tensor src, @StringView String reduce)
@ByRef public Tensor addbmm_(@Const @ByRef Tensor batch1, @Const @ByRef Tensor batch2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByVal public Tensor addbmm(@Const @ByRef Tensor batch1, @Const @ByRef Tensor batch2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar beta, @Const @ByRef(nullValue="at::Scalar(1)") Scalar alpha)
@ByRef public Tensor random_(@Cast(value="int64_t") long from, @ByVal LongOptional to, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor random_(@Cast(value="int64_t") long to, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor random_(@ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor uniform_(double from, double to, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor cauchy_(double median, double sigma, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor log_normal_(double mean, double std, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor exponential_(double lambd, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByRef public Tensor geometric_(double p, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByVal public Tensor cross(@Const @ByRef Tensor other, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim)
@ByVal public Tensor take_along_dim(@Const @ByRef Tensor indices, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim)
@ByVal public Tensor index_select(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index)
@ByVal public Tensor nonzero_static(@Cast(value="int64_t") long size, @Cast(value="int64_t") long fill_value)
@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector nonzero_numpy()
@ByVal public Tensor gather(@Cast(value="int64_t") long dim, @Const @ByRef Tensor index, @Cast(value="bool") boolean sparse_grad)
@ByVal public Tensor gather(@ByVal Dimname dim, @Const @ByRef Tensor index, @Cast(value="bool") boolean sparse_grad)
@ByVal public Tensor addcmul(@Const @ByRef Tensor tensor1, @Const @ByRef Tensor tensor2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar value)
@ByRef public Tensor addcmul_(@Const @ByRef Tensor tensor1, @Const @ByRef Tensor tensor2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar value)
@ByVal public Tensor addcdiv(@Const @ByRef Tensor tensor1, @Const @ByRef Tensor tensor2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar value)
@ByRef public Tensor addcdiv_(@Const @ByRef Tensor tensor1, @Const @ByRef Tensor tensor2, @Const @ByRef(nullValue="at::Scalar(1)") Scalar value)
@ByVal public T_TensorTensor_T triangular_solve(@Const @ByRef Tensor A, @Cast(value="bool") boolean upper, @Cast(value="bool") boolean transpose, @Cast(value="bool") boolean unitriangular)
@ByVal public T_TensorTensor_T triangular_solve(@Const @ByRef Tensor A)
@ByVal public T_TensorTensorTensor_T svd(@Cast(value="bool") boolean some, @Cast(value="bool") boolean compute_uv)
@ByVal public T_TensorTensorTensor_T svd()
@ByVal public Tensor swapaxes(@Cast(value="int64_t") long axis0, @Cast(value="int64_t") long axis1)
@ByRef public Tensor swapaxes_(@Cast(value="int64_t") long axis0, @Cast(value="int64_t") long axis1)
@ByVal public Tensor swapdims(@Cast(value="int64_t") long dim0, @Cast(value="int64_t") long dim1)
@ByRef public Tensor swapdims_(@Cast(value="int64_t") long dim0, @Cast(value="int64_t") long dim1)
@ByVal public Tensor cholesky_solve(@Const @ByRef Tensor input2, @Cast(value="bool") boolean upper)
@ByVal public T_TensorTensor_T qr(@Cast(value="bool") boolean some)
@ByVal public T_TensorTensor_T qr()
@ByVal public T_TensorTensor_T geqrf()
@ByVal public Tensor ormqr(@Const @ByRef Tensor input2, @Const @ByRef Tensor input3, @Cast(value="bool") boolean left, @Cast(value="bool") boolean transpose)
@ByVal public Tensor lu_solve(@Const @ByRef Tensor LU_data, @Const @ByRef Tensor LU_pivots)
@ByVal public Tensor multinomial(@Cast(value="int64_t") long num_samples, @Cast(value="bool") boolean replacement, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByVal public Tensor dist(@Const @ByRef Tensor other, @Const @ByRef(nullValue="at::Scalar(2)") Scalar p)
@ByVal public Tensor histc(@Cast(value="int64_t") long bins, @Const @ByRef(nullValue="at::Scalar(0)") Scalar min, @Const @ByRef(nullValue="at::Scalar(0)") Scalar max)
@ByVal public T_TensorTensor_T histogram(@Const @ByRef Tensor bins, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional weight, @Cast(value="bool") boolean density)
@ByVal public T_TensorTensor_T histogram(@Const @ByRef Tensor bins)
@ByVal public T_TensorTensor_T histogram(@Cast(value="int64_t") long bins, @ByVal(nullValue="c10::optional<at::ArrayRef<double> >(c10::nullopt)") DoubleArrayRefOptional range, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional weight, @Cast(value="bool") boolean density)
@ByVal public T_TensorTensor_T histogram()
@ByVal public T_TensorTensor_T histogram(@Cast(value="int64_t") long bins, @ByVal(nullValue="c10::optional<at::ArrayRef<double> >(c10::nullopt)") @Cast(value={"double*","c10::ArrayRef<double>","std::vector<double>&"}) @StdVector double[] range, @Const @ByRef(nullValue="c10::optional<at::Tensor>{}") TensorOptional weight, @Cast(value="bool") boolean density)
@ByVal public Tensor quantile(@Const @ByRef Tensor q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView BytePointer interpolation)
@ByVal public Tensor quantile(@Const @ByRef Tensor q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView String interpolation)
@ByVal public Tensor quantile(double q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView BytePointer interpolation)
@ByVal public Tensor quantile(double q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView String interpolation)
@ByVal public Tensor nanquantile(@Const @ByRef Tensor q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView BytePointer interpolation)
@ByVal public Tensor nanquantile(@Const @ByRef Tensor q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView String interpolation)
@ByVal public Tensor nanquantile(double q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView BytePointer interpolation)
@ByVal public Tensor nanquantile(double q, @ByVal(nullValue="c10::optional<int64_t>(c10::nullopt)") LongOptional dim, @Cast(value="bool") boolean keepdim, @StringView String interpolation)
@ByVal public T_TensorTensor_T sort(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean descending)
@ByVal public T_TensorTensor_T sort()
@ByVal public T_TensorTensor_T sort(@ByVal BoolOptional stable, @Cast(value="int64_t") long dim, @Cast(value="bool") boolean descending)
@ByVal public T_TensorTensor_T sort(@ByVal BoolOptional stable)
@ByVal public T_TensorTensor_T sort(@ByVal Dimname dim, @Cast(value="bool") boolean descending)
@ByVal public T_TensorTensor_T sort(@ByVal Dimname dim)
@ByVal public T_TensorTensor_T sort(@ByVal BoolOptional stable, @ByVal Dimname dim, @Cast(value="bool") boolean descending)
@ByVal public T_TensorTensor_T sort(@ByVal BoolOptional stable, @ByVal Dimname dim)
@ByVal public Tensor argsort(@Cast(value="int64_t") long dim, @Cast(value="bool") boolean descending)
@ByVal public Tensor argsort(@Cast(value="bool") boolean stable, @Cast(value="int64_t") long dim, @Cast(value="bool") boolean descending)
@ByVal public T_TensorTensor_T topk(@Cast(value="int64_t") long k, @Cast(value="int64_t") long dim, @Cast(value="bool") boolean largest, @Cast(value="bool") boolean sorted)
@ByVal public T_TensorTensor_T topk(@Cast(value="int64_t") long k)
@ByVal public T_TensorTensor_T topk_symint(@ByVal SymInt k, @Cast(value="int64_t") long dim, @Cast(value="bool") boolean largest, @Cast(value="bool") boolean sorted)
@ByVal public T_TensorTensor_T topk_symint(@ByVal SymInt k)
@ByVal public Tensor renorm(@Const @ByRef Scalar p, @Cast(value="int64_t") long dim, @Const @ByRef Scalar maxnorm)
@ByRef public Tensor renorm_(@Const @ByRef Scalar p, @Cast(value="int64_t") long dim, @Const @ByRef Scalar maxnorm)
@ByVal public Tensor unfold(@Cast(value="int64_t") long dimension, @Cast(value="int64_t") long size, @Cast(value="int64_t") long step)
@ByRef public Tensor normal_(double mean, double std, @ByVal(nullValue="c10::optional<at::Generator>(c10::nullopt)") GeneratorOptional generator)
@ByVal public T_TensorTensor_T slogdet()
@ByVal public Tensor to_padded_tensor(double padding, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") LongArrayRefOptional output_size)
@ByVal public Tensor to_padded_tensor(double padding, @ByVal(nullValue="at::OptionalIntArrayRef(c10::nullopt)") @Cast(value={"int64_t*","c10::ArrayRef<int64_t>","std::vector<int64_t>&"}) @StdVector long... output_size)
@ByVal public Tensor to_padded_tensor_symint(double padding, @ByVal(nullValue="at::OptionalSymIntArrayRef(c10::nullopt)") SymIntArrayRefOptional output_size)
@ByVal public Tensor to(@ByVal TypeMeta type_meta, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy)
@ByVal public Tensor to(@ByVal Device device, @ByVal TypeMeta type_meta, @Cast(value="bool") boolean non_blocking, @Cast(value="bool") boolean copy)
@ByVal public Tensor tensor_data()
.data()
function on Variable
, and is intended
to be used from functions that need to access the Variable
's equivalent Tensor
(i.e. Tensor
that shares the same storage and tensor metadata with the Variable
).
One notable difference with the legacy .data()
function is that changes to the
returned Tensor
's tensor metadata (e.g. sizes / strides / storage / storage_offset)
will not update the original Variable
, due to the fact that this function
shallow-copies the Variable
's underlying TensorImpl.tensor_data
in class TensorBase
@ByVal public Tensor variable_data()
var.variable_data()
in C++ has the same semantics as tensor.data
in Python, which create a new Variable
that shares the same storage and
tensor metadata with the original Variable
, but with a completely new
autograd history.
NOTE: If we change the tensor metadata (e.g. sizes / strides /
storage / storage_offset) of a variable created from var.variable_data()
, those
changes will not update the original variable var
. In .variable_data()
, we set
allow_tensor_metadata_change_
to false to make such changes explicitly illegal,
in order to prevent users from changing metadata of var.variable_data()
and expecting the original variable var
to also be updated.variable_data
in class TensorBase
@ByVal public Tensor data()
hook(Tensor grad) -> Tensor
hook(Tensor grad) -> void
The hook should not modify its argument, but it can optionally return a new gradient
which will be used in place of grad
.
This function returns the index of the hook in the list which can be used to remove hook.
Example:
auto v = torch::tensor({0., 0., 0.}, torch::requires_grad());
auto h = v.register_hook([](torch::Tensor grad){ return grad * 2; }); // double the gradient
v.backward(torch::tensor({1., 2., 3.}));
// This prints:
// ```
// 2
// 4
// 6
// [ CPUFloatType{3} ]
// ```
std::cout << v.grad() << std::endl;
v.remove_hook(h); // removes the hook
data
in class TensorBase
public void _backward(@ByVal TensorArrayRef inputs, @Const @ByRef TensorOptional gradient, @ByVal BoolOptional keep_graph, @Cast(value="bool") boolean create_graph)
public void _backward(@ByVal TensorVector inputs, @Const @ByRef TensorOptional gradient, @ByVal BoolOptional keep_graph, @Cast(value="bool") boolean create_graph)
@Const @ByRef public Tensor requires_grad_(@Cast(value="bool") boolean _requires_grad)
requires_grad_
in class TensorBase
@Const @ByRef public Tensor requires_grad_()
requires_grad_
in class TensorBase
Copyright © 2024. All rights reserved.