Skip to content

Commit 1b0c056

Browse files
committed
Add docstring.
1 parent 4c56f32 commit 1b0c056

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

keras/engine/topology.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,6 +2716,18 @@ def save_weights_to_hdf5_group(f, layers):
27162716
def 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

0 commit comments

Comments
 (0)