set_layer_weights: Set Layer Weights

Description Usage Arguments Value

View source: R/6-set.R

Description

This function sets the weights of a layer.

Usage

1
set_layer_weights(model, layer, weights, freeze)

Arguments

model

A keras model.

layer

The layer name or index.

weights

A matrix or list of matrices. The weights. For example, the output of get_layer_weights.

freeze

A logical. Toggles whether or not to freeze the weights. If frozen, the weights will not update during re-training.

Value

Null. This function updates the model in place.


tpq/caress documentation built on March 11, 2021, 8:03 p.m.