File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2716,6 +2716,18 @@ def save_weights_to_hdf5_group(f, layers):
27162716def preprocess_weights_for_loading (layer , weights ,
27172717 original_keras_version = None ,
27182718 original_backend = None ):
2719+ """Converts layers weights from Keras 1 format to Keras 2.
2720+
2721+ # Arguments
2722+ layer: Layer instance.
2723+ weights: List of weights values (Numpy arrays).
2724+ original_keras_version: Keras version for the weights, as a string.
2725+ original_backend: Keras backend the weights were trained with,
2726+ as a string.
2727+
2728+ # Returns
2729+ A list of weights values (Numpy arrays).
2730+ """
27192731 if original_keras_version == '1' :
27202732 if layer .__class__ .__name__ == 'Conv1D' :
27212733 shape = weights [0 ].shape
You can’t perform that action at this time.
0 commit comments