MCPcopy Index your code
hub / github.com/tensorflow/tfjs / getMetricIdentifiers

Method getMetricIdentifiers

tfjs-layers/src/engine/training.ts:1959–1975  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1957 }
1958
1959 private getMetricIdentifiers(): MetricsIdentifier[]|
1960 {[key: string]: MetricsIdentifier} {
1961 if (typeof this.metrics === 'string' ||
1962 typeof this.metrics === 'function') {
1963 return [toSnakeCase(Metrics.getLossOrMetricName(this.metrics))];
1964 } else if (Array.isArray(this.metrics)) {
1965 return this.metrics.map(
1966 metric => toSnakeCase(Metrics.getLossOrMetricName(metric)));
1967 } else {
1968 const metricsIdentifiers: {[key: string]: MetricsIdentifier} = {};
1969 for (const key in this.metrics) {
1970 metricsIdentifiers[key] =
1971 toSnakeCase(Metrics.getLossOrMetricName(this.metrics[key]));
1972 }
1973 return metricsIdentifiers;
1974 }
1975 }
1976
1977 protected getTrainingConfig(): TrainingConfig {
1978 return {

Callers 1

getTrainingConfigMethod · 0.95

Calls 1

toSnakeCaseFunction · 0.90

Tested by

no test coverage detected