public class MKLDNNBatchNormHelper extends Object implements BatchNormalizationHelper
Constructor and Description |
---|
MKLDNNBatchNormHelper(DataType dataType) |
Modifier and Type | Method and Description |
---|---|
Pair<Gradient,INDArray> |
backpropGradient(INDArray input,
INDArray epsilon,
long[] shape,
INDArray gamma,
INDArray beta,
INDArray dGammaView,
INDArray dBetaView,
double eps,
CNN2DFormat format,
LayerWorkspaceMgr workspaceMgr) |
boolean |
checkSupported() |
boolean |
checkSupported(double eps,
boolean fixedGammaBeta) |
INDArray |
getMeanCache(DataType dataType) |
INDArray |
getVarCache(DataType dataType) |
Map<String,Long> |
helperMemoryUse()
Return the currently allocated memory for the helper.
(a) Excludes: any shared memory used by multiple helpers/layers (b) Excludes any temporary memory (c) Includes all memory that persists for longer than the helper method This is mainly used for debugging and reporting purposes. |
INDArray |
preOutput(INDArray x,
boolean training,
long[] shape,
INDArray gamma,
INDArray beta,
INDArray mean,
INDArray var,
double decay,
double eps,
CNN2DFormat format,
LayerWorkspaceMgr workspaceMgr) |
protected OpContext context
public MKLDNNBatchNormHelper(DataType dataType)
public boolean checkSupported(double eps, boolean fixedGammaBeta)
checkSupported
in interface BatchNormalizationHelper
public Pair<Gradient,INDArray> backpropGradient(INDArray input, INDArray epsilon, long[] shape, INDArray gamma, INDArray beta, INDArray dGammaView, INDArray dBetaView, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
backpropGradient
in interface BatchNormalizationHelper
public INDArray preOutput(INDArray x, boolean training, long[] shape, INDArray gamma, INDArray beta, INDArray mean, INDArray var, double decay, double eps, CNN2DFormat format, LayerWorkspaceMgr workspaceMgr)
preOutput
in interface BatchNormalizationHelper
public INDArray getMeanCache(DataType dataType)
getMeanCache
in interface BatchNormalizationHelper
public INDArray getVarCache(DataType dataType)
getVarCache
in interface BatchNormalizationHelper
public Map<String,Long> helperMemoryUse()
LayerHelper
helperMemoryUse
in interface LayerHelper
public boolean checkSupported()
checkSupported
in interface LayerHelper
Copyright © 2022. All rights reserved.