Watch keynotes, product sessions, workshops, and more from Google I/O See playlist


Pooling heads sharing the same pooling stem.

inner_dim The dimensionality of inner projection layer.
cls_list a list of pairs of (classification problem name and the numbers of classes.
cls_token_idx The index inside the sequence to pool.
activation Dense layer activation.
dropout_rate Dropout probability.
initializer Initializer for dense layer kernels.
**kwargs Keyword arguments.




View source

This is where the layer's logic lives.

Note here that call() method in tf.keras is little bit different from keras API. In keras API, you can pass support masking for layers as additional arguments. Whereas tf.keras has compute_mask() method to support masking.

inputs Input tensor, or list/tuple of input tensors.
*args Additional positional arguments. Currently unused.
**kwargs Additional keyword arguments. Currently unused.

A tensor or list/tuple of tensors.