# UninitializedParameter

Source: https://www.tensorplay.cn/docs/generated/tensorplay.nn.UninitializedParameter.html

# UninitializedParameter

class tensorplay.nn.UninitializedParameter(requires_grad=True, device=None, dtype=None)[[source]](../_modules/tensorplay/nn/parameter.html#UninitializedParameter)

A parameter that is not initialized.

Uninitialized Parameters are a special case of [tensorplay.nn.Parameter](tensorplay.nn.Parameter.html#tensorplay.nn.Parameter)
where the shape of the data is still unknown.

Unlike a [tensorplay.nn.Parameter](tensorplay.nn.Parameter.html#tensorplay.nn.Parameter), uninitialized parameters
hold no data and attempting to access some properties, like their shape,
will throw a runtime error. The only operations that can be performed on a uninitialized
parameter are changing its datatype, moving it to a different device and
converting it to a regular [tensorplay.nn.Parameter](tensorplay.nn.Parameter.html#tensorplay.nn.Parameter).

The default device or dtype to use when the parameter is materialized can be set
during construction using e.g. device='cuda'.

abs(Tensor self) &#x2192; Tensor

abs_(Tensor(a!) self) -> Tensor(a!)

acos(Tensor self) &#x2192; Tensor

acosh(Tensor self) &#x2192; Tensor

add()

add_()

[add_](#id5).Tensor(Tensor(a!) self, Tensor other, [*](#id1), Scalar alpha=1) -> Tensor(a!) | [add_](#id7).Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!)

addbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) &#x2192; Tensor

addcdiv(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) &#x2192; Tensor

addcdiv_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!)

addcmul(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) &#x2192; Tensor

addcmul_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!)

addmv(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) &#x2192; Tensor

addr(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) &#x2192; Tensor

airy_ai(Tensor self) &#x2192; Tensor

all(Tensor self) -> Tensor | all.dim(Tensor self, int[] dim, bool keepdim=false) &#x2192; Tensor

allclose(Tensor self, Tensor other, float rtol=1e-05, float atol=1e-08, bool equal_nan=False) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

angle(Tensor self) &#x2192; Tensor

any(Tensor self) -> Tensor | any.dim(Tensor self, int[] dim, bool keepdim=false) &#x2192; Tensor

argmax(Tensor self, int? dim=None, bool keepdim=False) &#x2192; Tensor

argmin(Tensor self, int? dim=None, bool keepdim=False) &#x2192; Tensor

argsort(Tensor self, int dim=-1, bool descending=False) &#x2192; Tensor

argwhere(Tensor self) &#x2192; Tensor

as_strided(self: tensorplay._C.TensorBase, size: [collections.abc.Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[SupportsInt](https://docs.python.org/3/library/typing.html#typing.SupportsInt) | [SupportsIndex](https://docs.python.org/3/library/typing.html#typing.SupportsIndex)], stride: [collections.abc.Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[SupportsInt](https://docs.python.org/3/library/typing.html#typing.SupportsInt) | [SupportsIndex](https://docs.python.org/3/library/typing.html#typing.SupportsIndex)], storage_offset: [SupportsInt](https://docs.python.org/3/library/typing.html#typing.SupportsInt) | [SupportsIndex](https://docs.python.org/3/library/typing.html#typing.SupportsIndex) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; tensorplay._C.TensorBase

asin(Tensor self) &#x2192; Tensor

asinh(Tensor self) &#x2192; Tensor

atan(Tensor self) &#x2192; Tensor

atan2(Tensor self, Tensor other) &#x2192; Tensor

atanh(Tensor self) &#x2192; Tensor

backward(self: tensorplay._C.TensorBase, gradient: tensorplay._C.TensorBase | [None](https://docs.python.org/3/library/constants.html#None) = None, retain_graph: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None) = None, create_graph: [bool](https://docs.python.org/3/library/functions.html#bool) = False) &#x2192; [None](https://docs.python.org/3/library/constants.html#None)

bernoulli(Tensor self) &#x2192; Tensor

bernoulli_(Tensor(a!) self) -> Tensor(a!)

bessel_j0(Tensor self) &#x2192; Tensor

bessel_j1(Tensor self) &#x2192; Tensor

bessel_y0(Tensor self) &#x2192; Tensor

bessel_y1(Tensor self) &#x2192; Tensor

bincount(Tensor self, Tensor? weights=None, int minlength=0) &#x2192; Tensor

bitwise_and()

bitwise_left_shift()

bitwise_not(Tensor self) &#x2192; Tensor

bitwise_or()

bitwise_right_shift()

bitwise_xor()

bmm(Tensor self, Tensor mat2) &#x2192; Tensor

broadcast_to(Tensor self, int[] size) &#x2192; Tensor

cauchy_(Tensor(a!) self, float median=0.0, float sigma=1.0) -> Tensor(a!)

ceil(Tensor self) &#x2192; Tensor

celu(Tensor self, Scalar alpha=1.0) &#x2192; Tensor

channel_shuffle(Tensor self, int groups) &#x2192; Tensor

cholesky(Tensor self, bool upper=False) &#x2192; Tensor

cholesky_inverse(Tensor self, bool upper=False) &#x2192; Tensor

cholesky_solve(Tensor self, Tensor input2, bool upper=False) &#x2192; Tensor

chunk(Tensor self, int chunks, int dim=0) &#x2192; Tensor[]

clamp(Tensor self, Scalar? min=None, Scalar? max=None) &#x2192; Tensor

clamp_(Tensor(a!) self, Scalar? min=None, Scalar? max=None) -> Tensor(a!)

clip(Tensor self, Scalar? min=None, Scalar? max=None) &#x2192; Tensor

clone(Tensor self, *, MemoryFormat? memory_format=None) &#x2192; Tensor

cls_to_become

alias of [Parameter](tensorplay.nn.Parameter.html#tensorplay.nn.Parameter)

coalesce(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

col_indices(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

conj(Tensor self) &#x2192; Tensor

contiguous(Tensor self, *, MemoryFormat memory_format=Contiguous) &#x2192; Tensor

copy_(Tensor(a!) self, Tensor src, bool non_blocking=False) -> Tensor(a!)

cos(Tensor self) &#x2192; Tensor

cosh(Tensor self) &#x2192; Tensor

cpu()

Returns a copy of this object in CPU memory.
If this object is already in CPU memory, then no copy is performed and the original object is returned.

crow_indices(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

cuda(device=None, non_blocking=False)

Returns a copy of this object in CUDA memory.
If this object is already in CUDA memory and on the correct device, then no copy is performed and the original object is returned.

cummax(Tensor self, int dim) -> (Tensor values, Tensor indices)

cummin(Tensor self, int dim) -> (Tensor values, Tensor indices)

cumprod(Tensor self, int dim, ScalarType? dtype=None) &#x2192; Tensor

cumsum(Tensor self, int dim=0, ScalarType? dtype=None) &#x2192; Tensor

data_ptr(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

deg2rad(Tensor self) &#x2192; Tensor

dense_dim(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

dequantize_per_channel(Tensor self, Tensor scales, Tensor zero_points, int axis=0) &#x2192; Tensor

dequantize_per_tensor(Tensor self, float scale, int zero_point) &#x2192; Tensor

detach(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

detach_(self: [object](https://docs.python.org/3/library/functions.html#object)) &#x2192; [object](https://docs.python.org/3/library/functions.html#object)

diag(Tensor self, int diagonal=0) &#x2192; Tensor

diag_embed(Tensor self, int offset=0, int dim1=0, int dim2=1) &#x2192; Tensor

diagonal(Tensor self, int offset=0, int dim1=0, int dim2=1) &#x2192; Tensor

diagonal_scatter(Tensor self, Tensor src, int offset=0, int dim1=0, int dim2=1) &#x2192; Tensor

digamma(Tensor self) &#x2192; Tensor

dim(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

dist(Tensor self, Tensor other, Scalar p=2) &#x2192; Tensor

div()

div_()

[div_](#id9).Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) | [div_](#id11).Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)

dot(Tensor self, Tensor tensor) &#x2192; Tensor

dsplit()

element_size(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

elu(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) &#x2192; Tensor

eq()

equal(Tensor self, Tensor other) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

erf(Tensor self) &#x2192; Tensor

erfc(Tensor self) &#x2192; Tensor

erfinv(Tensor self) &#x2192; Tensor

exp(Tensor self) &#x2192; Tensor

exp2(Tensor self) &#x2192; Tensor

expand_as(Tensor self, Tensor other) &#x2192; Tensor

expm1(Tensor self) &#x2192; Tensor

exponential_(Tensor(a!) self, float lambd=1.0) -> Tensor(a!)

fill_()

[fill_](#id13).Scalar(Tensor(a!) self, Scalar value) -> Tensor(a!)

fix(Tensor self) &#x2192; Tensor

flatten(start_dim=0, end_dim=-1)

Flattens a contiguous range of dims.

floor(Tensor self) &#x2192; Tensor

frac(Tensor self) &#x2192; Tensor

gather(Tensor self, int dim, Tensor index) &#x2192; Tensor

gcd(Tensor self, Tensor other) &#x2192; Tensor

ge()

gelu(Tensor self, str approximate="none") &#x2192; Tensor

geometric_(Tensor(a!) self, float p) -> Tensor(a!)

glu(Tensor self, int dim=-1) &#x2192; Tensor

greater(Tensor self, Tensor other) &#x2192; Tensor

greater_equal(Tensor self, Tensor other) &#x2192; Tensor

gt()

hardshrink(Tensor self, Scalar lambd=0.5) &#x2192; Tensor

hardsigmoid(Tensor self) &#x2192; Tensor

hardswish(Tensor self) &#x2192; Tensor

hardtanh(Tensor self, Scalar min_val=-1, Scalar max_val=1) &#x2192; Tensor

heaviside(Tensor self, Tensor values) &#x2192; Tensor

hsplit()

hypot(Tensor self, Tensor other) &#x2192; Tensor

i0e(Tensor self) &#x2192; Tensor

i1(Tensor self) &#x2192; Tensor

i1e(Tensor self) &#x2192; Tensor

imag(Tensor self) &#x2192; Tensor

index_copy(Tensor self, int dim, Tensor index, Tensor source) &#x2192; Tensor

index_fill()

index_fill_()

[index_fill_](#id15).Scalar(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!) | [index_fill_](#id17).Tensor(Tensor(a!) self, int dim, Tensor index, Tensor value) -> Tensor(a!)

index_put(Tensor self, Tensor[] indices, Tensor values, bool accumulate=False) &#x2192; Tensor

index_put_(Tensor(a!) self, Tensor[] indices, Tensor values, bool accumulate=False) -> Tensor(a!)

index_select(Tensor self, int dim, Tensor index) &#x2192; Tensor

inner(Tensor self, Tensor other) &#x2192; Tensor

is_channels_last(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_channels_last_2d(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_channels_last_3d(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_coalesced(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_complex(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_contiguous(*args, **kwargs)

Overloaded function.

- is_contiguous(self: tensorplay._C.TensorBase) -> bool

- is_contiguous(self: tensorplay._C.TensorBase, memory_format: typing.SupportsInt | typing.SupportsIndex) -> bool

is_floating_point(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_pinned(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_shared(self: [object](https://docs.python.org/3/library/functions.html#object)) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

is_sparse_csr(self: tensorplay._C.TensorBase) &#x2192; [bool](https://docs.python.org/3/library/functions.html#bool)

isclose(Tensor self, Tensor other, float rtol=1e-05, float atol=1e-08, bool equal_nan=False) &#x2192; Tensor

isfinite(Tensor self) &#x2192; Tensor

isinf(Tensor self) &#x2192; Tensor

isnan(Tensor self) &#x2192; Tensor

isneginf(Tensor self) &#x2192; Tensor

isposinf(Tensor self) &#x2192; Tensor

isreal(Tensor self) &#x2192; Tensor

itemsize(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

kthvalue(Tensor self, int k, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices)

lcm(Tensor self, Tensor other) &#x2192; Tensor

le()

leaky_relu(Tensor self, Scalar negative_slope=0.01) &#x2192; Tensor

lerp(Tensor self, Tensor end, Scalar weight) -> Tensor | lerp.Tensor(Tensor self, Tensor end, Tensor weight) &#x2192; Tensor

lerp_()

[lerp_](#id19).Scalar(Tensor(a!) self, Tensor end, Scalar weight) -> Tensor(a!) | [lerp_](#id21).Tensor(Tensor(a!) self, Tensor end, Tensor weight) -> Tensor(a!)

less(Tensor self, Tensor other) &#x2192; Tensor

less_equal(Tensor self, Tensor other) &#x2192; Tensor

lgamma(Tensor self) &#x2192; Tensor

log(Tensor self) &#x2192; Tensor

log10(Tensor self) &#x2192; Tensor

log1p(Tensor self) &#x2192; Tensor

log2(Tensor self) &#x2192; Tensor

log_normal_(Tensor(a!) self, float mean=1.0, float std=2.0) -> Tensor(a!)

log_softmax(Tensor self, int dim, ScalarType dtype=Undefined) &#x2192; Tensor

logaddexp(Tensor self, Tensor other) &#x2192; Tensor

logaddexp2(Tensor self, Tensor other) &#x2192; Tensor

logcumsumexp(Tensor self, int dim, ScalarType? dtype=None) &#x2192; Tensor

logical_not(Tensor self) &#x2192; Tensor

logical_or(Tensor self, Tensor other) &#x2192; Tensor

logical_xor(Tensor self, Tensor other) &#x2192; Tensor

logit(Tensor self, Scalar? eps=None) &#x2192; Tensor

logsumexp(Tensor self, int dim, bool keepdim=False) &#x2192; Tensor

lt()

masked_fill()

masked_fill_()

[masked_fill_](#id23).Tensor(Tensor(a!) self, Tensor mask, Tensor value) -> Tensor(a!) | masked_fill_(Tensor(a!) self, Tensor mask, Scalar value) -> Tensor(a!)

masked_scatter(Tensor self, Tensor mask, Tensor source) &#x2192; Tensor

masked_select(Tensor self, Tensor mask) &#x2192; Tensor

materialize(shape, device=None, dtype=None)

Create a Parameter or Tensor with the same properties of the uninitialized one.

Given a shape, it materializes a parameter in the same device
and with the same dtype as the current one or the specified ones in the
arguments.

Parameters:

- shape – (tuple): the shape for the materialized tensor.

- device ([tensorplay.device](tensorplay.device.html#tensorplay.device)) – the desired device of the parameters and buffers in this module. Optional.

- dtype ([tensorplay.dtype](tensorplay.dtype.html#tensorplay.dtype)) – the desired floating point type of the floating point parameters and buffers in this module. Optional.

matmul(Tensor self, Tensor other) &#x2192; Tensor

max(Tensor self) -> Tensor | max.dim(Tensor self, int[] dim, bool keepdim=false) &#x2192; Tensor

mean(Tensor self, *, ScalarType dtype=Undefined) -> Tensor | mean.dim(Tensor self, int[] dim, bool keepdim=false, *, ScalarType dtype=Undefined) &#x2192; Tensor

median(Tensor self) &#x2192; Tensor

memory_format(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

min(Tensor self) -> Tensor | min.dim(Tensor self, int[] dim, bool keepdim=false) &#x2192; Tensor

mish(Tensor self) &#x2192; Tensor

mm(Tensor self, Tensor mat2) &#x2192; Tensor

mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices)

modified_bessel_i1(Tensor self) &#x2192; Tensor

modified_bessel_k0(Tensor self) &#x2192; Tensor

modified_bessel_k1(Tensor self) &#x2192; Tensor

moveaxis()

movedim(Tensor self, int[] source, int[] destination) &#x2192; Tensor

msort(Tensor self) &#x2192; Tensor

mul()

mul_()

[mul_](#id25).Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) | [mul_](#id27).Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)

mv(Tensor self, Tensor vec) &#x2192; Tensor

nan_to_num(Tensor self, Scalar nan=0.0, Scalar? posinf=None, Scalar? neginf=None) &#x2192; Tensor

nanmean(Tensor self, int? dim=None, bool keepdim=False, *, ScalarType? dtype=None) &#x2192; Tensor

nanmedian(Tensor self) &#x2192; Tensor

nansum(Tensor self, int[] dim=[], bool keepdim=False) &#x2192; Tensor

narrow(Tensor self, int dim, int start, int length) &#x2192; Tensor

ndimension() &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

Alias for dim()

ne()

neg(Tensor self) &#x2192; Tensor

neg_(Tensor(a!) self) -> Tensor(a!)

negative(Tensor self) &#x2192; Tensor

nextafter(Tensor self, Tensor other) &#x2192; Tensor

norm(Tensor self, float p=2.0) -> Tensor | norm.dim(Tensor self, int[] dim, float p=2.0, bool keepdim=false) &#x2192; Tensor

normal_(Tensor(a!) self, float mean=0.0, float std=1.0) -> Tensor(a!)

not_equal(Tensor self, Tensor other) &#x2192; Tensor

numel(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

numpy(self: [object](https://docs.python.org/3/library/functions.html#object)) &#x2192; numpy.ndarray

outer(Tensor self, Tensor vec2) &#x2192; Tensor

pdist(Tensor self, float p=2.0) &#x2192; Tensor

pin_memory(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

poisson(Tensor self) &#x2192; Tensor

polygamma(int n, Tensor self) &#x2192; Tensor

positive(Tensor self) &#x2192; Tensor

pow()

prelu(Tensor self, Tensor weight) &#x2192; Tensor

prod(Tensor self, *, ScalarType dtype=Undefined) -> Tensor | prod.dim_IntList(Tensor self, int[] dim, bool keepdim=false, *, ScalarType dtype=Undefined) &#x2192; Tensor

quantize_per_channel(Tensor self, Tensor scales, Tensor zero_points, int axis=0) &#x2192; Tensor

quantize_per_tensor(Tensor self, float scale, int zero_point, int quant_min=-128, int quant_max=127) &#x2192; Tensor

rad2deg(Tensor self) &#x2192; Tensor

random_(Tensor(a!) self, int low=0, int high=0) -> Tensor(a!)

ravel(Tensor self) &#x2192; Tensor

reciprocal(Tensor self) &#x2192; Tensor

register_hook(hook)

Registers a backward hook (torch’s Tensor.register_hook).

The hook is called every time a gradient with respect to this tensor is
computed. It may modify the gradient by returning a replacement Tensor;
returning None leaves the gradient unchanged. Hooks compose in
registration order.

Returns a RemovableHandle whose
remove() method (or context-manager form) unregisters the hook.

register_post_accumulate_grad_hook(hook)

Registers a hook (torch’s Tensor.register_post_accumulate_grad_hook).

The hook runs after the gradient has been accumulated into self.grad.
It receives the tensor (the parameter) and its return value is ignored;
unlike [register_hook()](#tensorplay.nn.UninitializedParameter.register_hook) it cannot replace the gradient, but it may
modify self.grad in place. Only leaf tensors that require grad and
are used in the autograd graph support this hook.

Returns a RemovableHandle.

relu(Tensor self) &#x2192; Tensor

relu6(Tensor self) &#x2192; Tensor

relu_(Tensor(a!) self) -> Tensor(a!)

renorm(Tensor self, Scalar p, int dim, Scalar maxnorm) &#x2192; Tensor

repeat(Tensor self, int[] repeats) &#x2192; Tensor

requires_grad_(self: [object](https://docs.python.org/3/library/functions.html#object), requires_grad: [bool](https://docs.python.org/3/library/functions.html#bool) = True) &#x2192; [object](https://docs.python.org/3/library/functions.html#object)

reshape(Tensor self, int[] shape) &#x2192; Tensor

resize_(Tensor(a!) self, int[] size) -> Tensor(a!)

retain_grad(self: tensorplay._C.TensorBase) &#x2192; [None](https://docs.python.org/3/library/constants.html#None)

rot90(Tensor self, int k=1, int[] dims=[]) &#x2192; Tensor

round(Tensor self) &#x2192; Tensor

rsqrt(Tensor self) &#x2192; Tensor

rsqrt_(Tensor(a!) self) -> Tensor(a!)

scaled_modified_bessel_k0(Tensor self) &#x2192; Tensor

scaled_modified_bessel_k1(Tensor self) &#x2192; Tensor

scatter()

scatter_()

[scatter_](#id29).src(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!) | [scatter_](#id31).value(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!)

scatter_add(Tensor self, int dim, Tensor index, Tensor src) &#x2192; Tensor

scatter_add_(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!)

select(Tensor self, int dim, int index) &#x2192; Tensor

select_scatter(Tensor self, Tensor src, int dim, int index) &#x2192; Tensor

selu(Tensor self) &#x2192; Tensor

sgn(Tensor self) &#x2192; Tensor

sigmoid(Tensor self) &#x2192; Tensor

sign(Tensor self) &#x2192; Tensor

signbit(Tensor self) &#x2192; Tensor

silu(Tensor self) &#x2192; Tensor

sin(Tensor self) &#x2192; Tensor

sinc(Tensor self) &#x2192; Tensor

sinh(Tensor self) &#x2192; Tensor

size(*args, **kwargs)

Overloaded function.

- size(self: tensorplay._C.TensorBase) -> tensorplay._C.Size

- size(self: tensorplay._C.TensorBase, arg0: typing.SupportsInt | typing.SupportsIndex) -> int

slice(Tensor self, int dim=0, int? start=None, int? end=None, int step=1) &#x2192; Tensor

slice_scatter(Tensor self, Tensor src, int dim=0, int? start=None, int? end=None, int step=1) &#x2192; Tensor

softmax(Tensor self, int dim, ScalarType dtype=Undefined) &#x2192; Tensor

softplus(Tensor self, Scalar beta=1, Scalar threshold=20) &#x2192; Tensor

softshrink(Tensor self, Scalar lambd=0.5) &#x2192; Tensor

sort(Tensor self, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices)

sparse_dim(self: tensorplay._C.TensorBase) &#x2192; [int](https://docs.python.org/3/library/functions.html#int)

sparse_mask(self: tensorplay._C.TensorBase, mask: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

sparse_sum(Tensor self, int[]? dim=None, ScalarType? dtype=None) &#x2192; Tensor

spherical_bessel_j0(Tensor self) &#x2192; Tensor

split(Tensor self, int split_size, int dim=0) -> Tensor[] | split.sizes(Tensor self, int[] split_sizes, int dim=0) &#x2192; Tensor[]

split_with_sizes(Tensor self, int[] split_sizes, int dim=0) &#x2192; Tensor[]

sqrt(Tensor self) &#x2192; Tensor

sqrt_(Tensor(a!) self) -> Tensor(a!)

square(Tensor self) &#x2192; Tensor

squeeze(Tensor self) -> Tensor | squeeze.dim(Tensor self, int dim) &#x2192; Tensor

std(Tensor self, int correction=1) -> Tensor | std.dim(Tensor self, int[] dim, int correction=1, bool keepdim=false) &#x2192; Tensor

stride(*args, **kwargs)

Overloaded function.

- stride(self: tensorplay._C.TensorBase) -> tuple

- stride(self: tensorplay._C.TensorBase, arg0: typing.SupportsInt | typing.SupportsIndex) -> int

sub()

sub_()

[sub_](#id33).Tensor(Tensor(a!) self, Tensor other, [*](#id3), Scalar alpha=1) -> Tensor(a!) | [sub_](#id35).Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!)

sum(Tensor self, *, ScalarType dtype=Undefined) -> Tensor | sum.dim_IntList(Tensor self, int[] dim, bool keepdim=false, *, ScalarType dtype=Undefined) &#x2192; Tensor

svd(Tensor self, bool some=True, bool compute_uv=True) -> (Tensor U, Tensor S, Tensor V)

swapaxes(Tensor self, int axis0, int axis1) &#x2192; Tensor

swapdims(Tensor self, int dim0, int dim1) &#x2192; Tensor

t()

Returns the transpose of the tensor.
Aliased to transpose(0, 1) to ensure correct autograd behavior (TransposeBackward).

take(Tensor self, Tensor index) &#x2192; Tensor

take_along_dim(Tensor self, Tensor indices, int? dim=None) &#x2192; Tensor

tan(Tensor self) &#x2192; Tensor

tanh(Tensor self) &#x2192; Tensor

tensor_split()

tile(Tensor self, int[] dims) &#x2192; Tensor

to(*args, **kwargs)

Overloaded function.

- to(self: tensorplay._C.TensorBase, dtype: tensorplay._C.DType, non_blocking: bool = False, copy: bool = False) -> tensorplay._C.TensorBase

- to(self: tensorplay._C.TensorBase, device: tensorplay._C.Device, non_blocking: bool = False, copy: bool = False) -> tensorplay._C.TensorBase

- to(self: tensorplay._C.TensorBase, device: tensorplay._C.Device, dtype: tensorplay._C.DType, non_blocking: bool = False, copy: bool = False) -> tensorplay._C.TensorBase

to_dense(Tensor self) &#x2192; Tensor

to_sparse(Tensor self) &#x2192; Tensor

to_sparse_csr(Tensor self) &#x2192; Tensor

tolist(self: tensorplay._C.TensorBase) &#x2192; [object](https://docs.python.org/3/library/functions.html#object)

trace(Tensor self) &#x2192; Tensor

transpose(Tensor self, int dim0, int dim1) &#x2192; Tensor

triangular_solve(Tensor self, Tensor A, bool upper=False, bool transpose=False, bool unitriangular=False) -> (Tensor solution, Tensor cloned_coefficient)

tril(Tensor self, int diagonal=0) &#x2192; Tensor

triu(Tensor self, int diagonal=0) &#x2192; Tensor

trunc(Tensor self) &#x2192; Tensor

type(dtype=None, non_blocking=False, **kwargs)

Returns the type if dtype is not provided, else casts this object to the specified type.

unbind(Tensor self, int dim=0) &#x2192; Tensor[]

unflatten(dim, sizes)

Expands a dimension of the input tensor over multiple dimensions.

unfold(dimension, size, step)

Returns a view of the original tensor which contains all slices of
size [size](#tensorplay.nn.UninitializedParameter.size) from self in the dimension dimension,
stepping by step (torch’s Tensor.unfold).

Port of aten/src/ATen/native/TensorShape.cpp: the view appends a new
trailing dimension of length size and re-strides dimension by
step.

uniform_(Tensor(a!) self, float from=0.0, float to=1.0) -> Tensor(a!)

unsqueeze(Tensor self, int dim) &#x2192; Tensor

values(self: tensorplay._C.TensorBase) &#x2192; tensorplay._C.TensorBase

var(Tensor self, int correction=1) -> Tensor | var.dim(Tensor self, int[] dim, int correction=1, bool keepdim=false) &#x2192; Tensor

vdot(Tensor self, Tensor other) &#x2192; Tensor

view(Tensor self, int[] shape) &#x2192; Tensor

vsplit()

zero_(Tensor(a!) self) -> Tensor(a!)

zeta(Tensor self, Tensor other) &#x2192; Tensor
