View source on GitHub |
In place removes unused options in kwargs.
tfm.nlp.layers.util.filter_kwargs(
kwargs
)
This function removes the construction signatures: e.g. number_attention_heads... in TransformerEncoderBlock. This is needed, otherwise base_layer.py in Keras will complain. Args: kwargs: keyword arguments to be filtered.