class_docstr: A layer to unpack a dictionary of sample features and neighbor features.
  
  Missing neighbor inputs will also be created for the functional API.
docstr: Initializes an instance of `NeighborFeatures`.
  
  Args:
    neighbor_config: A `configs.GraphNeighborConfig` instance describing
      neighbor attributes.
    feature_names: Optional[List[Text]], names denoting the keys of features
      for which to create neighbor inputs. If `None`, all features are assumed
      to have corresponding neighbor features.
    weight_dtype: `tf.DType` for `neighbor_weights`. Defaults to `tf.float32`.
    **kwargs: Additional arguments to be passed `tf.keras.layers.Layer`.
docstr_tok: ["Initializes","an","instance","of","`","NeighborFeatures","`",".","Args",":","neighbor_config",":","A","`","configs.GraphNeighborConfig","`","instance","describing","neighbor","attributes",".","feature_names",":","Optional","[","List","[","Text","]","]",",","names","denoting","the","keys","of","features","for","which","to","create","neighbor","inputs",".","If","`","None","`",",","all","features","are","assumed","to","have","corresponding","neighbor","features",".","weight_dtype",":","`","tf.DType","`","for","`","neighbor_weights","`",".","Defaults","to","`","tf.float32","`",".","*","*","kwargs",":","Additional","arguments","to","be","passed","`","tf.keras.layers.Layer","`","."]
code: def __init__(
      self,
      neighbor_config=None,
      feature_names=None,
      weight_dtype=None,
      **kwargs,
  ):
      """Initializes an instance of `NeighborFeatures`.
  
      Args:
        neighbor_config: A `configs.GraphNeighborConfig` instance describing
          neighbor attributes.
        feature_names: Optional[List[Text]], names denoting the keys of features
          for which to create neighbor inputs. If `None`, all features are assumed
          to have corresponding neighbor features.
        weight_dtype: `tf.DType` for `neighbor_weights`. Defaults to `tf.float32`.
        **kwargs: Additional arguments to be passed `tf.keras.layers.Layer`.
      """
      super(NeighborFeatures, self).__init__(
          autocast=False,
          dtype=kwargs.pop("dtype")
          if "dtype" in kwargs
          else weight_dtype,
          **kwargs,
      )
      self._neighbor_config = (
          configs.GraphNeighborConfig()
          if neighbor_config is None
          else attr.evolve(neighbor_config)
      )
      self._feature_names = (
          feature_names if feature_names is None else set(feature_names)
      )
  
file_path: neural-structured-learning/neural_structured_learning/keras/layers/neighbor_features.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import attr
  import neural_structured_learning.configs
  from neural_structured_learning.lib import utils
  import tensorflow
label_desc: Use image node_id 1 to create a new NeighborFeatures object from inherited base classes: tf.keras.layers with example: obj = NeighborFeatures(neighbor_config, feature_names, weight_dtype)