Package org.jetbrains.kotlinx.dl.api.core.summary

Types

LayerSummary
Link copied to clipboard
data class LayerSummary(name: String, type: String, outputShape: TensorShape, paramsCount: Long, inboundLayers: List<String>)

The common information about layer.

ModelSummary
Link copied to clipboard
data class ModelSummary(type: String, name: String?, layersSummaries: List<LayerSummary>, trainableParamsCount: Long, frozenParamsCount: Long)

The common information about model.

Functions

format
Link copied to clipboard
fun ModelSummary.format(layerNameColumnName: String = "Layer (type) ", outputShapeColumnName: String = "Output Shape ", paramsCountColumnName: String = "Param # ", connectedToColumnName: String = "Connected to ", columnSeparator: String = " ", lineSeparator: Char = '_', thickLineSeparator: Char = '=', withConnectionsColumn: Boolean = layersSummaries.any { it.inboundLayers.size > 1 }): List<String>

Formats model summary

log
Link copied to clipboard
fun ModelSummary.log(logger: Logger = ModelSummaryLogger.logger)

Formats and log model summary to logger By defaults prints to ModelSummaryLogger

logSummary
Link copied to clipboard
fun TrainableModel.logSummary(logger: Logger = ModelSummaryLogger.logger)

Formats and log model summary to logger By defaults prints to ModelSummaryLogger

print
Link copied to clipboard
fun ModelSummary.print(out: PrintStream = System.out)

Formats and prints model summary to output stream By defaults prints to console

printSummary
Link copied to clipboard
fun TrainableModel.printSummary(out: PrintStream = System.out)

Formats and prints model summary to output stream By defaults prints to console