Package deepboof.misc
Class TensorFactory<T extends Tensor>
java.lang.Object
deepboof.misc.TensorFactory<T>
public class TensorFactory<T extends Tensor>
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description TensorFactory(java.lang.Class tensorType) -
Method Summary
Modifier and Type Method Description Tcreate(int... shape)java.lang.Class<T>getTensorType()Trandom(java.util.Random rand, boolean subTensor, double min, double max, int... shape)Trandom(java.util.Random rand, boolean subTensor, int... shape)TrandomM(java.util.Random rand, boolean subTensor, int minibatch, int[] shape)Creates a random tensor with the specified shape and values from -1 to 1
-
Constructor Details
-
TensorFactory
public TensorFactory(java.lang.Class tensorType)
-
-
Method Details
-
create
-
randomM
Creates a random tensor with the specified shape and values from -1 to 1- Parameters:
rand- Random number generatorsubTensor- Should it be a sub-tensor or not?minibatch- Number of mini-batchesshape- Shape of the tensor, without minibatch- Returns:
- The random tensor
-
random
-
random
-
getTensorType
-