public class Neocognitron
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Neocognitron(NeocognitronStructure initStruct)
Initialize the neocognitron using the structure dictated in the
NeocognitronStructure class
|
Modifier and Type | Method and Description |
---|---|
int |
determineOutput(double[] out)
Given the output from the final layer, determine the output of
the network.
|
NeocognitronStructure |
getStructure()
Get the structure used to initialize the neocognitron
|
static Neocognitron |
OpenNeocognitron(java.io.File f)
Open a previously saved neocognitron file and returns the
original Neocognitron.
|
int |
propagate(double[][] input,
boolean train)
Given an input matrix (character image), the neural network determined
which character the image represents.
|
static void |
SaveNeocognitron(Neocognitron n,
java.io.File f)
Serialize the neocognitron and save it to a specific file.
|
public Neocognitron(NeocognitronStructure initStruct)
initStruct
- Initial structure and constants for the new necognitronpublic NeocognitronStructure getStructure()
public int propagate(double[][] input, boolean train)
input
- A square image containing the character to be recognized.train
- A boolean value which determines if the network should
be trained or notpublic int determineOutput(double[] out)
out
- Output from the last layer in the neocognitron.public static void SaveNeocognitron(Neocognitron n, java.io.File f)
n
- Neocognitron object to be savedf
- Location of the resulting neocognitron.public static Neocognitron OpenNeocognitron(java.io.File f)
f
- File which contains the neocognitron