model_mirror: Copy Weights from Another Model

Description Usage Arguments Value

View source: R/6-set.R

Description

This function uses a pre-trained "reference" model to automatically set the weights for all layers that have the same name.

Usage

1
model_mirror(model, reference, freeze)

Arguments

model

A keras model.

reference

Another keras model. The model from which to copy the 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.