loadWeightsByPathTemplates
fun GraphTrainableModel.loadWeightsByPathTemplates(hdfFile: HdfFile, kernelDataPathTemplate: String = KERNEL_DATA_PATH_TEMPLATE, biasDataPathTemplate: String = BIAS_DATA_PATH_TEMPLATE)
Content copied to clipboard
Loads weights from hdf5 file created in Keras TensorFlow framework.
Parameters
hdfFile
File in hdf5 file format containing weights of Sequential model.
kernelDataPathTemplate
Template path to kernel weights of the specific layer.
biasDataPathTemplate
Template path to bias weights of the specific layer.
fun GraphTrainableModel.loadWeightsByPathTemplates(hdfFile: HdfFile, layerList: List<Layer>, kernelDataPathTemplate: String = KERNEL_DATA_PATH_TEMPLATE, biasDataPathTemplate: String = BIAS_DATA_PATH_TEMPLATE)
Content copied to clipboard
Loads weights from hdf5 file created in Keras TensorFlow framework for pre-defined list of layers.
NOTE: Weights for another layers will not be loaded (should be initialized manually).
Parameters
hdfFile
File in hdf5 file format containing weights of Sequential model.
layerList
List of layers to load weights. Weights for other layers will be initialized by initializer later.
kernelDataPathTemplate
Template path to kernel weights of the specific layer.
biasDataPathTemplate
Template path to bias weights of the specific layer.