public abstract class AComponent extends Object implements IComponent, Iterable<IComponent>
| Constructor and Description |
|---|
AComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyConstraints() |
protected void |
applyConstraintsInternal() |
AComponent |
clone()
Creates a clone of a module, including a deep copy of any mutable state.
|
mikera.vectorz.AVector |
generate(mikera.vectorz.AVector output) |
void |
generate(mikera.vectorz.AVector input,
mikera.vectorz.AVector output) |
IComponent |
getComponent(int i) |
ArrayList<IConstraint> |
getConstraints() |
LossFunction |
getDefaultLossFunction()
Returns the default loss function that should be used
|
IComponent |
getDownStack() |
int |
getInputLength() |
IInputState |
getInputState() |
double |
getLearnFactor() |
List<IModule> |
getModules()
Returns a list of sub-components of this module
|
int |
getOutputLength() |
int |
getParameterLength()
Returns the length of the parameter vector for this model
|
IComponent |
getUpStack() |
void |
initRandom()
Randomly initialises a component's parameters
|
boolean |
isStochastic() |
boolean |
isSynthesiser() |
Iterator<IComponent> |
iterator() |
void |
setConstraint(IConstraint con) |
void |
setInput(mikera.vectorz.AVector inputValues) |
void |
setLearnFactor(double value) |
void |
setOutput(mikera.vectorz.AVector outputValues) |
mikera.vectorz.AVector |
think(mikera.vectorz.AVector input) |
void |
think(mikera.vectorz.AVector input,
mikera.vectorz.AVector output) |
void |
thinkInternalTraining()
Thinks within the scope of the component.
|
IComponent |
topComponent() |
void |
train(mikera.vectorz.AVector input,
mikera.vectorz.AVector target)
Trains towards a target value.
|
void |
train(mikera.vectorz.AVector input,
mikera.vectorz.AVector target,
LossFunction loss,
double factor)
Trains towards a target value using a specified loss function.
|
abstract void |
trainGradientInternal(double factor)
Abstract method for training gradients.
|
void |
trainSynth(mikera.vectorz.AVector input) |
void |
trainSynth(mikera.vectorz.AVector input,
double factor) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponents, hasDifferentTrainingThinking, thinkInternalgetGradient, getParametersgetInput, getInputGradientgetOutput, getOutputGradientforEach, spliteratorpublic IComponent topComponent()
public void think(mikera.vectorz.AVector input,
mikera.vectorz.AVector output)
public void generate(mikera.vectorz.AVector input,
mikera.vectorz.AVector output)
generate in interface ISynthesiserpublic IComponent getUpStack()
getUpStack in interface ISynthesiserpublic IComponent getDownStack()
getDownStack in interface ISynthesiserpublic void thinkInternalTraining()
IComponentthinkInternalTraining in interface IComponentthinkInternalTraining in interface ITrainablepublic mikera.vectorz.AVector think(mikera.vectorz.AVector input)
public void setConstraint(IConstraint con)
public ArrayList<IConstraint> getConstraints()
public final mikera.vectorz.AVector generate(mikera.vectorz.AVector output)
generate in interface ISynthesiserpublic LossFunction getDefaultLossFunction()
IComponentgetDefaultLossFunction in interface IComponentpublic final double getLearnFactor()
getLearnFactor in interface IComponentpublic final void setLearnFactor(double value)
setLearnFactor in interface IComponentpublic final void train(mikera.vectorz.AVector input,
mikera.vectorz.AVector target)
ITrainabletrain in interface ITrainablepublic final void trainSynth(mikera.vectorz.AVector input)
trainSynth in interface IComponenttrainSynth in interface ISynthesiserpublic void trainSynth(mikera.vectorz.AVector input,
double factor)
trainSynth in interface ISynthesiserpublic final void train(mikera.vectorz.AVector input,
mikera.vectorz.AVector target,
LossFunction loss,
double factor)
ITrainabletrain in interface ITrainablepublic abstract void trainGradientInternal(double factor)
trainGradientInternal in interface IComponentpublic void initRandom()
IComponentinitRandom in interface IComponentpublic void setInput(mikera.vectorz.AVector inputValues)
setInput in interface IInputStatepublic void setOutput(mikera.vectorz.AVector outputValues)
setOutput in interface IOutputStatepublic int getParameterLength()
IParameterisedgetParameterLength in interface IParameterisedpublic IComponent getComponent(int i)
public List<IModule> getModules()
IModulegetModules in interface IModulepublic IInputState getInputState()
getInputState in interface IComponentpublic int getInputLength()
getInputLength in interface IInputpublic int getOutputLength()
getOutputLength in interface IOutputpublic boolean isStochastic()
isStochastic in interface IComponentpublic boolean isSynthesiser()
isSynthesiser in interface IComponentprotected void applyConstraintsInternal()
public final void applyConstraints()
applyConstraints in interface IComponentpublic AComponent clone()
IModuleclone in interface IComponentclone in interface IModuleclone in interface IParameterisedclone in interface ISynthesiserclone in interface IThinkerclone in interface ITrainableclone in class Objectpublic Iterator<IComponent> iterator()
iterator in interface Iterable<IComponent>Copyright © 2014. All rights reserved.