Skip to content

Different ways to import parameters

Albert Zeyer edited this page Sep 18, 2021 · 19 revisions

There are multiple ways how parameters can be imported from some other model or checkpoint.

Custom script generating new TF checkpoint

This is the most flexible option.

Config option preload_from_files

Config option import_model_train_epoch1

The parameters must match exactly. In a new training (first epoch), instead of random initialization, it would load the given model checkpoint.

Layer option custom_param_importer

Layer param init options (forward_weights_init and others)

The param init uses get_initializer and can in principle use any initializer (e.g. load_txt_file_initializer), or even custom initializing code, which could import other parameters from a checkpoint or elsewhere.

SubnetworkLayer option load_on_init

Clone this wiki locally