of

fun of(vararg layers: Layer, noInput: Boolean = false): Functional
fun of(layers: List<Layer>, noInput: Boolean = false): Functional

Creates the Functional model.

Return

the Functional model.

Parameters

layers

The layers to describe the model design. All connections between the layers must be established and form an acyclic directed graph. Layers could be ordered in free way.

NOTE: First layer should be an input layer, if you want to compile model.

fun of(pretrainedModel: GraphTrainableModel, topModel: GraphTrainableModel): Functional

Creates the Functional model from two models: pretrainedModel and topModel. All layers of pretrainedModel will be frozen automatically. The input of the topModel will be connected to the output of the pretrainedModel.

NOTE: First layer of pretrainedModel should be an input layer. NOTE: Both models should be non-compiled yet.

Return

the Functional model.