Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

nsl.lib.apply_feature_mask

View source on GitHub

Applies a feature mask on features if the mask is not None.

nsl.lib.apply_feature_mask(
    features,
    feature_mask=None
)

Args:

  • features: A dense tensor representing features.
  • feature_mask: A dense tensor with values in [0, 1] and a broadcastable shape to 'features'. If not set, or set to None, the 'features' will be returned untouched.

Returns:

A dense tensor has the same shape as 'features'.