Small update to the documentation of lambda layers.
PiperOrigin-RevId: 355070948 Change-Id: I2f32fff3373ca331e00cc56d3a798994910cd31d
This commit is contained in:
parent
16e7f80686
commit
229cbce4ca
@ -756,13 +756,15 @@ class RepeatVector(Layer):
|
||||
class Lambda(Layer):
|
||||
"""Wraps arbitrary expressions as a `Layer` object.
|
||||
|
||||
The `Lambda` layer exists so that arbitrary TensorFlow functions
|
||||
can be used when constructing `Sequential` and Functional API
|
||||
models. `Lambda` layers are best suited for simple operations or
|
||||
quick experimentation. For more advanced use cases, follow
|
||||
The `Lambda` layer exists so that arbitrary expressions can be used
|
||||
as a `Layer` when constructing `Sequential`
|
||||
and Functional API models. `Lambda` layers are best suited for simple
|
||||
operations or quick experimentation. For more advanced use cases, follow
|
||||
[this guide](https://www.tensorflow.org/guide/keras/custom_layers_and_models)
|
||||
for subclassing `tf.keras.layers.Layer`.
|
||||
|
||||
WARNING: `tf.keras.layers.Lambda` layers have (de)serialization limitations!
|
||||
|
||||
The main reason to subclass `tf.keras.layers.Layer` instead of using a
|
||||
`Lambda` layer is saving and inspecting a Model. `Lambda` layers
|
||||
are saved by serializing the Python bytecode, which is fundamentally
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user