ModelSummary

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

The common information about model.

Constructors

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

Properties

frozenParamsCount
Link copied to clipboard
val frozenParamsCount: Long

The number of frozen parameters.

layersSummaries
Link copied to clipboard
val layersSummaries: List<LayerSummary>

The summary of the all layers included in the model.

name
Link copied to clipboard
val name: String?

The model name.

totalParamsCount
Link copied to clipboard
val totalParamsCount: Long

The total number of model's parameters.

trainableParamsCount
Link copied to clipboard
val trainableParamsCount: Long

The number of trainable parameters.

type
Link copied to clipboard
val type: String

The model type.

Extensions

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

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