public class Tensors extends Object
Modifier and Type | Method and Description |
---|---|
static float[] |
absMax(float[] arr,
float[] max)
Returns array with max values for each position in the given input vectors.
|
static Tensor |
absMax(Tensor t,
Tensor max)
Returns tensors with max value for each component of input tensors.
|
static float[] |
absMin(float[] arr,
float[] min) |
static Tensor |
absMin(Tensor t,
Tensor min) |
static void |
add(float[] array1,
float[] array2)
Adds given vector and store result in first.
|
static void |
copy(float[] src,
float[] dest) |
static void |
copy(Tensor src,
Tensor dest) |
static float[] |
copyOf(float[] arr) |
static void |
div(float[] array,
float val) |
static void |
div(float[] array,
float[] divisor) |
static void |
fillFourthDim(Tensor deltaWeights,
int fourthIdx,
float val) |
static void |
max(Tensor t1,
Tensor t2,
Tensor result) |
static void |
min(Tensor t1,
Tensor t2,
Tensor result) |
static void |
multiply(float[] arr1,
float[] arr2) |
static Tensor |
ones(int cols) |
static Tensor |
random(int size) |
static Tensor |
random(int rows,
int cols)
Generate and return random tensor with specified number of rows and cols.
|
static Tensor |
random(int rows,
int cols,
int depth) |
static Tensor |
random(int rows,
int cols,
int depth,
int fourthDim) |
static void |
sub(float[] arr,
float val) |
static void |
sub(float[] array1,
float[] array2) |
static Tensor |
zeros(int cols) |
public static float[] copyOf(float[] arr)
public static final void copy(float[] src, float[] dest)
public static void sub(float[] arr, float val)
public static void multiply(float[] arr1, float[] arr2)
public static void fillFourthDim(Tensor deltaWeights, int fourthIdx, float val)
public static Tensor absMax(Tensor t, Tensor max)
t
- max
- proposed max tensorpublic static float[] absMax(float[] arr, float[] max)
arr
- max
- public static float[] absMin(float[] arr, float[] min)
public static void div(float[] array, float val)
public static void div(float[] array, float[] divisor)
public static final void sub(float[] array1, float[] array2)
public static final void add(float[] array1, float[] array2)
array1
- array2
- public static Tensor zeros(int cols)
public static Tensor ones(int cols)
public static Tensor random(int size)
public static Tensor random(int rows, int cols)
rows
- cols
- public static Tensor random(int rows, int cols, int depth)
public static Tensor random(int rows, int cols, int depth, int fourthDim)
Copyright © 2022. All rights reserved.