()
| 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 { |
no test coverage detected