public interface NeuralNet<NN extends NeuralNet>
Modifier and Type | Method and Description |
---|---|
void |
applyGradient(Gradient[] gradients,
int batchSize)
update the params from the gradients and the batchSize
|
NN |
clone()
clone the Neural Net with the same paramaeters
|
void |
copy(NN from)
copy the parameters from a neural net
|
void |
fit(INDArray input,
INDArray[] labels)
fit from input and labels
|
double |
getLatestScore()
latest score from lastest fit
|
NeuralNetwork[] |
getNeuralNetworks()
Returns the underlying MultiLayerNetwork or ComputationGraph objects.
|
Gradient[] |
gradient(INDArray input,
INDArray[] labels)
Calculate the gradients from input and label (target) of all outputs
|
boolean |
isRecurrent()
returns true if this is a recurrent network
|
INDArray[] |
outputAll(INDArray batch) |
void |
reset()
required for recurrent networks during init
|
void |
save(OutputStream os)
save the neural net into an OutputStream
|
void |
save(String filename)
save the neural net into a filename
|
NeuralNetwork[] getNeuralNetworks()
boolean isRecurrent()
void reset()
INDArray[] outputAll(INDArray batch)
batch
- batch to evaluateNN clone()
void copy(NN from)
from
- where to copy parametersGradient[] gradient(INDArray input, INDArray[] labels)
input
- input batchlabels
- target batchvoid fit(INDArray input, INDArray[] labels)
input
- input batchlabels
- target batchvoid applyGradient(Gradient[] gradients, int batchSize)
gradients
- gradients to apply the gradient frombatchSize
- batchSize from which the gradient was calculated on (similar to nstep)double getLatestScore()
void save(OutputStream os) throws IOException
os
- OutputStream to save inIOException
void save(String filename) throws IOException
filename
- filename to save inIOException
Copyright © 2020. All rights reserved.