SmoothGradConfig.fromJson constructor

SmoothGradConfig.fromJson(
  1. Object? j
)

Implementation

factory SmoothGradConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return SmoothGradConfig(
    noiseSigma: switch (json['noiseSigma']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
    featureNoiseSigma: switch (json['featureNoiseSigma']) {
      null => null,
      Object $1 => FeatureNoiseSigma.fromJson($1),
    },
    noisySampleCount: switch (json['noisySampleCount']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
  );
}