public class GradCheckUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GradCheckUtil.ActGradConfig |
static class |
GradCheckUtil.Subset |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_DEBUG_MODE |
static double |
DEFAULT_EPS |
static boolean |
DEFAULT_EXIT_FIRST_FAILURE |
static double |
DEFAULT_MAX_REL_ERROR |
static double |
DEFAULT_MIN_ABS_ERROR |
static boolean |
DEFAULT_PRINT |
Constructor and Description |
---|
GradCheckUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkActivationGradients(GradCheckUtil.ActGradConfig config)
Gradient check the ACTIVATIONS (i.e., ARRAY type SDVariables) as opposed to the parameters of a network (as
are tested in
checkGradients(SameDiff, Map, double, double, double, boolean, boolean, boolean, boolean, Set, Map, int, Subset) |
static boolean |
checkGradients(SameDiff sd,
Map<String,INDArray> placeholderValues,
boolean print,
boolean exitOnFirstFailure) |
static boolean |
checkGradients(SameDiff sd,
Map<String,INDArray> placeholderValues,
double eps,
double maxRelError,
double minAbsError,
boolean print,
boolean exitOnFirstFailure) |
static boolean |
checkGradients(SameDiff sd,
Map<String,INDArray> placeholderValues,
double eps,
double maxRelError,
double minAbsError,
boolean print,
boolean exitOnFirstFailure,
boolean skipValidation,
boolean debugMode,
Set<String> skipVariables,
Map<String,INDArray> gradCheckMask) |
static boolean |
checkGradients(SameDiff sd,
Map<String,INDArray> placeholderValues,
double eps,
double maxRelError,
double minAbsError,
boolean print,
boolean exitOnFirstFailure,
boolean skipValidation,
boolean debugMode,
Set<String> skipVariables,
Map<String,INDArray> gradCheckMask,
int maxPerParam,
GradCheckUtil.Subset subset) |
static boolean |
checkGradients(SameDiff sd,
Map<String,INDArray> placeholderValues,
String... skipVariables) |
static boolean |
checkGradients(TestCase t) |
static void |
validateInternalState(SameDiff sd,
boolean generateAndCheckGradFn) |
public static final boolean DEFAULT_PRINT
public static final boolean DEFAULT_EXIT_FIRST_FAILURE
public static final boolean DEFAULT_DEBUG_MODE
public static final double DEFAULT_EPS
public static final double DEFAULT_MAX_REL_ERROR
public static final double DEFAULT_MIN_ABS_ERROR
public static boolean checkGradients(TestCase t)
public static boolean checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, String... skipVariables)
public static boolean checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, boolean print, boolean exitOnFirstFailure)
public static boolean checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure)
public static boolean checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure, boolean skipValidation, boolean debugMode, Set<String> skipVariables, Map<String,INDArray> gradCheckMask)
public static boolean checkGradients(SameDiff sd, Map<String,INDArray> placeholderValues, double eps, double maxRelError, double minAbsError, boolean print, boolean exitOnFirstFailure, boolean skipValidation, boolean debugMode, Set<String> skipVariables, Map<String,INDArray> gradCheckMask, int maxPerParam, GradCheckUtil.Subset subset)
public static boolean checkActivationGradients(GradCheckUtil.ActGradConfig config)
checkGradients(SameDiff, Map, double, double, double, boolean, boolean, boolean, boolean, Set, Map, int, Subset)
config
- Configuration for gradient checkpublic static void validateInternalState(SameDiff sd, boolean generateAndCheckGradFn)
Copyright © 2020. All rights reserved.