|TensorFlow 1 version||View source on GitHub|
This is the class from which all layers inherit.
Compat aliases for migration
See Migration guide for more details.
tf.keras.layers.Layer( trainable=True, name=None, dtype=None, dynamic=False, **kwargs )
Used in the notebooks
|Used in the guide||Used in the tutorials|
A layer is a callable object that takes as input one or more tensors and
that outputs one or more tensors. It involves computation, defined
call() method, and a state (weight variables), defined
either in the constructor
__init__() or in the
Users will just instantiate a layer and then treat it as a callable.
||Boolean, whether the layer's variables should be trainable.|
||String name of the layer.|
The dtype of the layer's computations and weights. Can also be a
Set this to |