tfm.nlp.layers.util.filter_kwargs

In place removes unused options in 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.