|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.engine.opencl.kernels.EncogKernel
org.encog.engine.opencl.kernels.KernelNetworkTrain
public class KernelNetworkTrain
An OpenCL kernel that is designed to calculate gradients and help train a neural network.
| Field Summary | |
|---|---|
static int |
PARRAY_INPUT_COUNT
The input count. |
static int |
PARRAY_ITEMS_PER
Items to train per call. |
static int |
PARRAY_ITERATIONS
Items to train per call. |
static int |
PARRAY_LAYER_COUNT
The layer count. |
static int |
PARRAY_LEARN
Are we learning? 0=no, 1 =yes. |
static int |
PARRAY_OUTPUT_COUNT
The output count. |
static int |
PARRAY_START
What is the starting index to train at. |
| Constructor Summary | |
|---|---|
KernelNetworkTrain(EncogCLDevice device,
FlatNetwork flat,
EngineIndexableSet training,
int tempDataSize)
Construct a kernel to train the network. |
|
| Method Summary | |
|---|---|
void |
assignWorkgroupSizes(int trainingSize,
int requestedGlobalSize)
Assign the workgroup sizes based on the training set size. |
void |
calculate(int start,
int size,
boolean learn,
int iterations)
Calculate one iteration over the specified range. |
void |
compile(Map<String,String> options,
OpenCLTrainingProfile profile,
FlatNetwork network)
Compile the kernel. |
float[] |
getErrors()
|
float[] |
getTempDataArray()
|
float[] |
getWeightOutArray()
|
void |
init(OpenCLTrainingProfile profile)
Setup the kernel. |
void |
release()
Release the kernel and all buffers. |
void |
setTempDataArray(float[] tempDataArray)
|
| Methods inherited from class org.encog.engine.opencl.kernels.EncogKernel |
|---|
compile, compile, createArrayReadOnly, createArrayReadOnly, createFloatArrayWriteOnly, getCLSource, getContext, getDevice, getGlobalWork, getKernel, getLocalWork, getMaxWorkGroupSize, getProgram, getSourceName, getWorkGroupLong, prepareKernel, releaseBuffer, setArg, setCLSource, setGlobalWork, setLocalWork |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PARRAY_INPUT_COUNT
public static final int PARRAY_OUTPUT_COUNT
public static final int PARRAY_LAYER_COUNT
public static final int PARRAY_LEARN
public static final int PARRAY_START
public static final int PARRAY_ITEMS_PER
public static final int PARRAY_ITERATIONS
| Constructor Detail |
|---|
public KernelNetworkTrain(EncogCLDevice device,
FlatNetwork flat,
EngineIndexableSet training,
int tempDataSize)
device - The OpenCL device to use.flat - The network to train.training - The training data.tempDataSize - How much temp data.| Method Detail |
|---|
public void assignWorkgroupSizes(int trainingSize,
int requestedGlobalSize)
trainingSize - The training set size.requestedGlobalSize - The requested global size.
public void calculate(int start,
int size,
boolean learn,
int iterations)
start - The starting position to calculate for.size - The ending position to calculate for.iterations - The number of iterations to execute.learn - True, if we should learn.
public void compile(Map<String,String> options,
OpenCLTrainingProfile profile,
FlatNetwork network)
options - The options.profile - The OpenCL training profile.network - The network to compile for.public float[] getErrors()
public float[] getTempDataArray()
public float[] getWeightOutArray()
public void init(OpenCLTrainingProfile profile)
profile - The OpenCL training profile.public void release()
release in class EncogKernelpublic void setTempDataArray(float[] tempDataArray)
tempDataArray - the tempDataArray to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||