Package network.aika
Class Model
java.lang.Object
network.aika.Model
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
TextModel
- Author:
- Lukas Molzberger
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToN
(int l) void
applyMovingAverage
(Config trainingConfig) void
close()
long
long
long
Thought<?>
getIdByLabel
(String label) long
getN()
getNeuronProvider
(String tokenLabel) void
abstract void
init()
lookupNeuron
(Long id) lookupNeuronProvider
(String tokenLabel, Model.NeuronProducer onNewCallback) void
open
(boolean create) void
void
readFields
(DataInput in, Model m) Deserialize the fields of this object fromin
.void
void
void
setCurrentThought
(Thought<?> currentThought) void
setCustomDataInstanceSupplier
(Supplier<Writable> customDataInstanceSupplier) void
setN
(long n) void
setSuspensionHook
(SuspensionCallback suspensionCallback) void
void
suspendUnusedNeurons
(long retrievalCount, SuspensionMode sm) toString()
void
void
write
(DataOutput out) Serialize the fields of this object toout
.
-
Field Details
-
activeProviders
-
-
Constructor Details
-
Model
public Model() -
Model
-
-
Method Details
-
init
public abstract void init() -
getIdByLabel
-
putLabel
-
getCustomDataInstanceSupplier
-
setCustomDataInstanceSupplier
-
getCurrentRetrievalCount
public long getCurrentRetrievalCount() -
incrementRetrievalCounter
public void incrementRetrievalCounter() -
createNeuronId
public long createNeuronId() -
getTemplates
-
getCurrentThought
-
setCurrentThought
-
getActiveNeurons
-
lookupNeuronProvider
-
getNeuronProvider
-
getNeuron
-
getAllNeurons
-
applyMovingAverage
-
getSuspensionHook
-
setSuspensionHook
-
addToN
public void addToN(int l) -
getN
public long getN() -
setN
public void setN(long n) -
lookupNeuron
-
suspendUnusedNeurons
-
suspendAll
-
registerWeakReference
-
register
-
unregister
-
open
- Throws:
IOException
-
close
- Throws:
IOException
-
write
Description copied from interface:Writable
Serialize the fields of this object toout
.- Specified by:
write
in interfaceWritable
- Parameters:
out
-DataOuput
to serialize this object into.- Throws:
IOException
-
readFields
Description copied from interface:Writable
Deserialize the fields of this object fromin
.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFields
in interfaceWritable
- Parameters:
in
-DataInput
to deseriablize this object from.- Throws:
Exception
-
toString
-
createThoughtId
public long createThoughtId()
-