public class NNParams
extends ml.shifu.guagua.io.HaltBytable
weights is used to set model weights which is used to transfer info from master to workers.
gradients is used to accumulate all workers' gradients together in master and then use the accumulated
gradients to update neural network weights.
| Constructor and Description |
|---|
NNParams() |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulateGradients(double[] gradients) |
void |
accumulateTrainSize(long size) |
void |
doReadFields(DataInput in) |
void |
doWrite(DataOutput out) |
double[] |
getGradients() |
double |
getTestError() |
double |
getTrainError() |
long |
getTrainSize() |
double[] |
getWeights() |
void |
reset() |
void |
setGradients(double[] gradients) |
void |
setTestError(double testError) |
void |
setTrainError(double trainError) |
void |
setTrainSize(long trainSize) |
void |
setWeights(double[] weights) |
String |
toString() |
public double[] getWeights()
public void setWeights(double[] weights)
public double getTestError()
public void setTestError(double testError)
public double getTrainError()
public void setTrainError(double trainError)
public void accumulateGradients(double[] gradients)
public double[] getGradients()
public void setGradients(double[] gradients)
gradients - the gradients to setpublic long getTrainSize()
public void setTrainSize(long trainSize)
public void accumulateTrainSize(long size)
public void reset()
public void doWrite(DataOutput out) throws IOException
doWrite in class ml.shifu.guagua.io.HaltBytableIOExceptionpublic void doReadFields(DataInput in) throws IOException
doReadFields in class ml.shifu.guagua.io.HaltBytableIOExceptionCopyright © 2019. All Rights Reserved.