org.ea.javacnn.data
Class DataBlock
- java.lang.Object
-
- org.ea.javacnn.data.DataBlock
-
- All Implemented Interfaces:
- java.io.Serializable
public class DataBlock extends java.lang.Object implements java.io.SerializableHolding all the data handled by the network. So a layer will receive this class and return a similar block as a output that will be used by the next layer in the chain.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DataBlock(int sx, int sy, int depth)DataBlock(int sx, int sy, int depth, double c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddFrom(DataBlock db)voidaddFromScaled(DataBlock db, double a)voidaddGradient(int ix, double val)voidaddGradient(int x, int y, int depth, double val)voidaddImageData(int[] imgData, int maxvalue)voidaddWeight(int x, int y, int depth, double val)voidclearGradient()DataBlockclone()DataBlockcloneAndZero()intgetDepth()doublegetGradient(int ix)doublegetGradient(int x, int y, int depth)double[]getGradients()intgetSX()intgetSY()doublegetWeight(int ix)doublegetWeight(int x, int y, int depth)double[]getWeights()voidmulGradient(int ix, double val)voidsetConst(double a)voidsetGradient(int ix, double val)voidsetGradient(int x, int y, int depth, double val)voidsetWeight(int ix, double val)voidsetWeight(int x, int y, int depth, double val)voidsubGradient(int ix, double val)
-
-
-
Constructor Detail
-
DataBlock
public DataBlock(int sx, int sy, int depth)
-
DataBlock
public DataBlock(int sx, int sy, int depth, double c)
-
-
Method Detail
-
addImageData
public void addImageData(int[] imgData, int maxvalue)
-
getSX
public int getSX()
-
getSY
public int getSY()
-
getDepth
public int getDepth()
-
getWeight
public double getWeight(int ix)
-
getWeight
public double getWeight(int x, int y, int depth)
-
setWeight
public void setWeight(int ix, double val)
-
setWeight
public void setWeight(int x, int y, int depth, double val)
-
addWeight
public void addWeight(int x, int y, int depth, double val)
-
getGradient
public double getGradient(int x, int y, int depth)
-
getGradient
public double getGradient(int ix)
-
setGradient
public void setGradient(int x, int y, int depth, double val)
-
setGradient
public void setGradient(int ix, double val)
-
addGradient
public void addGradient(int x, int y, int depth, double val)
-
addGradient
public void addGradient(int ix, double val)
-
subGradient
public void subGradient(int ix, double val)
-
mulGradient
public void mulGradient(int ix, double val)
-
cloneAndZero
public DataBlock cloneAndZero()
-
clone
public DataBlock clone()
- Overrides:
clonein classjava.lang.Object
-
clearGradient
public void clearGradient()
-
getWeights
public double[] getWeights()
-
getGradients
public double[] getGradients()
-
addFrom
public void addFrom(DataBlock db)
-
addFromScaled
public void addFromScaled(DataBlock db, double a)
-
setConst
public void setConst(double a)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG