Package deepnetts.tensor
Class Tensor3D
java.lang.Object
deepnetts.tensor.TensorBase
deepnetts.tensor.Tensor3D
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(float value, int z, int row, int col) floatchannelMean(int ch) final intcols()copy()final voidcopy2DSubChannel(int ch, float[] buff) Copies 2D channel values from this tensor into given float array buffer.final intdepth()voiddivChannel(float val, int ch) static Tensor3Dfinal floatget(int ch, int row, int col) final introws()final voidset(float val, int ch, int row, int col) voidsetRow(float[] rowData, int depthIdx, int rowIdx) final voidsub(float val, int z, int row, int col) toString()Methods inherited from class deepnetts.tensor.TensorBase
add, add, addInto, apply, apply, clone, copyFrom, copyFrom, copyFromGPU, copyToGPU, createAcceleratorBridge, div, div, div, equals, equals, fill, getAcceleratorBridge, getOrCreateAccBridge, getValues, hashCode, mean, multiply, multiply, multiplyElementWise, numDimensions, numElements, randomize, replace, setValues, setValuesFromString, setValuesFromStringTransposed, shape, sqr, sqrt, std, sub, sub, subInplace, subInto, sum, sumAbs, sumSqr, valuesAsString 
- 
Constructor Details
- 
Tensor3D
public Tensor3D(int depth, int rows, int cols) Creates a 3D tensor with specified number of rows, cols and depth.- Parameters:
 depth- tensor depthrows- number of rowscols- number of columns
 - 
Tensor3D
public Tensor3D(float[][][] vals) Creates a 3D tensor from specified 3D array- Parameters:
 vals- 2D array of tensor values
 - 
Tensor3D
public Tensor3D(int depth, int rows, int cols, float[] values)  
 - 
 - 
Method Details
- 
get
public final float get(int ch, int row, int col)  - 
set
public final void set(float val, int ch, int row, int col)  - 
add
public final void add(float value, int z, int row, int col)  - 
sub
public final void sub(float val, int z, int row, int col)  - 
copy
- Overrides:
 copyin classTensorBase
 - 
cols
public final int cols() - 
rows
public final int rows() - 
depth
public final int depth() - 
copy2DSubChannel
public final void copy2DSubChannel(int ch, float[] buff) Copies 2D channel values from this tensor into given float array buffer. Used on 3D tensors.- Parameters:
 ch- tensor channel to copybuff- buffer to copy values into
 - 
setRow
public void setRow(float[] rowData, int depthIdx, int rowIdx)  - 
channelMean
public float channelMean(int ch)  - 
divChannel
public void divChannel(float val, int ch)  - 
fromFile
- Throws:
 IOException
 - 
toString
- Overrides:
 toStringin classTensorBase
 
 -