* Print a text summary of the model's layers. * * The summary includes * - Name and type of all layers that comprise the model. * - Output shape(s) of the layers * - Number of weight parameters of each layer * - If the model has non-sequential-like topology, the inputs each layer
(
lineLength?: number, positions?: number[],
printFn:
// tslint:disable-next-line:no-any
(message?: any, ...optionalParams: any[]) => void = console.log)
| 557 | * @doc {heading: 'Models', subheading: 'Classes'} |
| 558 | */ |
| 559 | summary( |
| 560 | lineLength?: number, positions?: number[], |
| 561 | printFn: |
| 562 | // tslint:disable-next-line:no-any |
| 563 | (message?: any, ...optionalParams: any[]) => void = console.log) { |
| 564 | if (!this.built) { |
| 565 | throw new ValueError( |
| 566 | `This model has never been called, thus its weights have not been ` + |
| 567 | `created yet. So no summary can be displayed. Build the model ` + |
| 568 | `first (e.g., by calling it on some test data).`); |
| 569 | } |
| 570 | printSummary(this, lineLength, positions, printFn); |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Configures and prepares the model for training and evaluation. Compiling |
nothing calls this directly
no test coverage detected