(
callbacks: BaseCallback[], verbose: ModelLoggingVerbosity, epochs: number,
initialEpoch: number, numTrainSamples: number, stepsPerEpoch: number,
batchSize: number, doValidation: boolean,
callbackMetrics: string[])
| 577 | } |
| 578 | |
| 579 | export function configureCallbacks( |
| 580 | callbacks: BaseCallback[], verbose: ModelLoggingVerbosity, epochs: number, |
| 581 | initialEpoch: number, numTrainSamples: number, stepsPerEpoch: number, |
| 582 | batchSize: number, doValidation: boolean, |
| 583 | callbackMetrics: string[]): {callbackList: CallbackList, history: History} { |
| 584 | const history = new History(); |
| 585 | const actualCallbacks: BaseCallback[] = [ |
| 586 | new BaseLogger(), ...CallbackConstructorRegistry.createCallbacks(verbose) |
| 587 | ]; |
| 588 | if (callbacks != null) { |
| 589 | actualCallbacks.push(...callbacks); |
| 590 | } |
| 591 | actualCallbacks.push(history); |
| 592 | const callbackList = new CallbackList(actualCallbacks); |
| 593 | |
| 594 | // TODO(cais): Figure out when this LayersModel instance can have a |
| 595 | // dynamically |
| 596 | // set property called 'callback_model' as in PyKeras. |
| 597 | |
| 598 | callbackList.setParams({ |
| 599 | epochs, |
| 600 | initialEpoch, |
| 601 | samples: numTrainSamples, |
| 602 | steps: stepsPerEpoch, |
| 603 | batchSize, |
| 604 | verbose, |
| 605 | doValidation, |
| 606 | metrics: callbackMetrics, |
| 607 | }); |
| 608 | return {callbackList, history}; |
| 609 | } |
no test coverage detected
searching dependent graphs…