creation
23 memberslucid.creationFunctions
tensor→ TensorConstruct a new `Tensor` from Python data, a NumPy array, or another Tensor.
as_tensor→ TensorConvert data to a tensor, avoiding a copy when the source already matches.
from_numpy→ TensorCreate a CPU tensor from a NumPy `ndarray` with shared storage.
zeros→ TensorReturn a tensor filled with the additive identity element, zero.
ones→ TensorReturn a tensor filled with the multiplicative identity element, one.
empty→ TensorReturn a tensor whose elements are uninitialised (undefined memory).
full→ TensorReturn a tensor filled with a constant scalar value.
eye→ TensorReturn a 2-D matrix with ones on the main diagonal and zeros elsewhere.
arange→ TensorReturn a 1-D tensor of evenly spaced values over a half-open interval.
linspace→ TensorReturn a 1-D tensor of `steps` equally spaced values over a closed interval.
zeros_like→ TensorReturn a zero-filled tensor with the same shape, dtype, and device as `t`.
ones_like→ TensorReturn an all-ones tensor with the same shape, dtype, and device as `t`.
empty_like→ TensorReturn an uninitialised tensor with the same shape, dtype, and device as `t`.
full_like→ TensorReturn a constant-filled tensor with the same shape, dtype, and device as `t`.
logspace→ TensorReturn a 1-D tensor of `steps` values evenly spaced on a logarithmic scale.
manual_seed→ NoneSet the seed of the default Philox counter-based random number generator.
rand→ TensorReturn a tensor of samples drawn from the continuous uniform distribution.
randn→ TensorReturn a tensor of samples drawn from the standard normal distribution.
randint→ TensorReturn a tensor of samples drawn from the discrete uniform distribution.
bernoulli→ TensorReturn a tensor of independent Bernoulli trials with success probability `p`.
normal→ TensorReturn a tensor of samples drawn from a parametric normal distribution.
rand_like→ TensorReturn a $U[0,1)$ random tensor with the same shape, dtype, and device as `t`.
randn_like→ TensorReturn a $\mathcal{N}(0,1)$ random tensor with the same shape, dtype, and device as `t`.