module

creation

23 members
lucid.creation

Functions

fntensorTensor

Construct a new `Tensor` from Python data, a NumPy array, or another Tensor.

fnas_tensorTensor

Convert data to a tensor, avoiding a copy when the source already matches.

fnfrom_numpyTensor

Create a CPU tensor from a NumPy `ndarray` with shared storage.

fnzerosTensor

Return a tensor filled with the additive identity element, zero.

fnonesTensor

Return a tensor filled with the multiplicative identity element, one.

fnemptyTensor

Return a tensor whose elements are uninitialised (undefined memory).

fnfullTensor

Return a tensor filled with a constant scalar value.

fneyeTensor

Return a 2-D matrix with ones on the main diagonal and zeros elsewhere.

fnarangeTensor

Return a 1-D tensor of evenly spaced values over a half-open interval.

fnlinspaceTensor

Return a 1-D tensor of `steps` equally spaced values over a closed interval.

fnzeros_likeTensor

Return a zero-filled tensor with the same shape, dtype, and device as `t`.

fnones_likeTensor

Return an all-ones tensor with the same shape, dtype, and device as `t`.

fnempty_likeTensor

Return an uninitialised tensor with the same shape, dtype, and device as `t`.

fnfull_likeTensor

Return a constant-filled tensor with the same shape, dtype, and device as `t`.

fnlogspaceTensor

Return a 1-D tensor of `steps` values evenly spaced on a logarithmic scale.

fnmanual_seedNone

Set the seed of the default Philox counter-based random number generator.

fnrandTensor

Return a tensor of samples drawn from the continuous uniform distribution.

fnrandnTensor

Return a tensor of samples drawn from the standard normal distribution.

fnrandintTensor

Return a tensor of samples drawn from the discrete uniform distribution.

fnbernoulliTensor

Return a tensor of independent Bernoulli trials with success probability `p`.

fnnormalTensor

Return a tensor of samples drawn from a parametric normal distribution.

fnrand_likeTensor

Return a $U[0,1)$ random tensor with the same shape, dtype, and device as `t`.

fnrandn_likeTensor

Return a $\mathcal{N}(0,1)$ random tensor with the same shape, dtype, and device as `t`.