public class TensorFactory_F64
extends java.lang.Object
| Constructor and Description |
|---|
TensorFactory_F64() |
| Modifier and Type | Method and Description |
|---|---|
static Tensor_F64 |
random(java.util.Random rand,
boolean subTensor,
int... shape)
Creates a random tensor with the specified shape and values from -1 to 1
|
static Tensor_F64 |
randomMM(java.util.Random rand,
boolean subTensor,
double min,
double max,
int... shape)
Creates a random tensor with the specified shape and value range
|
static java.util.List<Tensor_F64> |
randomMM(java.util.Random rand,
boolean subTensor,
double min,
double max,
java.util.List<int[]> shapes)
Creates a random tensor with the specified shape and value range
|
static void |
randomMM(java.util.Random rand,
double min,
double max,
Tensor_F64 tensor)
Fills the tensor with random numbers selected from a uniform distribution.
|
static Tensor_F64 |
zeros(java.util.Random rand,
int... shape)
Generate a zeros tensor with the option for a sub-tensor
|
public static Tensor_F64 zeros(java.util.Random rand, int... shape)
rand - If you wish to generate a sub-matrix pass in this RNG and it will randomly offset the data. null
for regular tensorshape - Shape of the tensorpublic static Tensor_F64 random(java.util.Random rand, boolean subTensor, int... shape)
rand - Random number generatorsubTensor - Should it be a sub-tensor or not?shape - Shape of the tensorpublic static Tensor_F64 randomMM(java.util.Random rand, boolean subTensor, double min, double max, int... shape)
rand - Random number generatorsubTensor - Should it be a sub-tensor or not?min - Minimum value of each elementmax - Maximum value of each elementshape - Shape of the tensorpublic static java.util.List<Tensor_F64> randomMM(java.util.Random rand, boolean subTensor, double min, double max, java.util.List<int[]> shapes)
rand - Random number generatorsubTensor - Should it be a sub-tensor or not?min - Minimum value of each elementmax - Maximum value of each elementshapes - Shapes of the tensorspublic static void randomMM(java.util.Random rand,
double min,
double max,
Tensor_F64 tensor)
rand - Random number generatormin - min value, inclusivemax - max value, inclusivetensor - Tensor that is to be filled.