public interface Model
Modifier and Type | Method and Description |
---|---|
int |
batchSize()
The current inputs batch size
|
NeuralNetConfiguration |
conf()
The configuration for the neural network
|
void |
fit()
All models have a fit method
|
void |
fit(org.nd4j.linalg.api.ndarray.INDArray data)
Fit the model to the given data
|
Gradient |
getGradient()
Calculate a gradient
|
Pair<Gradient,Double> |
gradientAndScore()
Get the gradient and score
|
org.nd4j.linalg.api.ndarray.INDArray |
input()
The input/feature matrix for the model
|
void |
iterate(org.nd4j.linalg.api.ndarray.INDArray input)
Run one iteration
|
int |
numParams()
the number of parameters for the model
|
org.nd4j.linalg.api.ndarray.INDArray |
params()
Parameters of the model (if any)
|
double |
score()
The score for the model
|
void |
setConf(NeuralNetConfiguration conf)
Setter for the configuration
|
void |
setParams(org.nd4j.linalg.api.ndarray.INDArray params)
Set the parameters for this model.
|
org.nd4j.linalg.api.ndarray.INDArray |
transform(org.nd4j.linalg.api.ndarray.INDArray data)
Transform the data based on the model's output.
|
void |
update(Gradient gradient)
Perform one update applying the gradient
|
void |
validateInput()
Validate the input
|
void fit()
void update(Gradient gradient)
gradient
- the gradient to applydouble score()
org.nd4j.linalg.api.ndarray.INDArray transform(org.nd4j.linalg.api.ndarray.INDArray data)
data
- the data to transformorg.nd4j.linalg.api.ndarray.INDArray params()
int numParams()
void setParams(org.nd4j.linalg.api.ndarray.INDArray params)
params
- the parameters for the modelvoid fit(org.nd4j.linalg.api.ndarray.INDArray data)
data
- the data to fit the model tovoid iterate(org.nd4j.linalg.api.ndarray.INDArray input)
input
- the input to iterate onGradient getGradient()
Pair<Gradient,Double> gradientAndScore()
int batchSize()
NeuralNetConfiguration conf()
void setConf(NeuralNetConfiguration conf)
conf
- org.nd4j.linalg.api.ndarray.INDArray input()
void validateInput()
Copyright © 2015. All rights reserved.