Tensor creation routines (mygrad.tensor_creation
)#
Array-Like#
|
Create a tensor |
|
Convert the input to an array. |
|
Convert the input to a tensor. |
Ones and zeros#
|
Return a Tensor of the given shape and type, filled with ones. |
|
Return a Tensor of the same shape and type as the given, filled with ones. |
|
Return a Tensor of the given shape and type, filled with zeros. |
|
Return a Tensor of the same shape and type as the given, filled with zeros. |
|
Return a 2D Tensor with ones on the diagonal and zeros elsewhere. |
|
Return the identity Tensor; a square Tensor with 1s on the main diagonal and 0s elsewhere. |
|
Return a Tensor of the given shape and type, filled with fill_value. |
|
Return a Tensor of the same shape and type as the given, filled with fill_value. |
|
Return a new Tensor of the given shape and type, without initializing entries. |
|
Return a new Tensor of the same shape and type as the given array. |
Numerical ranges#
|
Return a Tensor with evenly-spaced values within a given interval. |
|
Return a Tensor with evenly-spaced numbers over a specified interval. |
|
Return a Tensor with evenly-spaced numbers over a specified interval on a log scale. |
|
Return a Tensor with evenly-spaced values in a geometric progression. |