Skip to content

Commit 968aff9

Browse files
committed
minor update doc
1 parent 0ff696f commit 968aff9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorlayer/layers/lambda_layers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ class Lambda(Layer):
5656
Please avoid using Model.save() / Model.load() to save / load models that contain such Lambda layer. Instead, you may use Model.save_weights() / Model.load_weights() to save / load model weights.
5757
Note: In this case, fn_weights should be a list, and then the trainable weights in this Lambda layer can be added into the weights of the whole model.
5858
59-
>>> a = [tf.Variable(1.0)]
59+
>>> a = tf.Variable(1.0)
6060
>>> def func(x):
61-
>>> return x + a[0]
61+
>>> return x + a
6262
>>> x = tl.layers.Input([8, 3], name='input')
63-
>>> y = tl.layers.Lambda(func, fn_weights=a, name='lambda')(x)
63+
>>> y = tl.layers.Lambda(func, fn_weights=[a], name='lambda')(x)
6464
6565
6666
Parametric case, merge other wrappers into TensorLayer:

0 commit comments

Comments
 (0)