class_docstr: A Keras Layer for Dynamic Embedding Lookup.
  
  This is useful when the gradient descent update is required for embedding
  lookup. The input of this layer is a `Tensor` of string keys and it outputs
  the embedding output as a float `Tensor`.
class_docstr_tok: ["A","Keras","Layer","for","Dynamic","Embedding","Lookup",".","This","is","useful","when","the","gradient","descent","update","is","required","for","embedding","lookup",".","The","input","of","this","layer","is","a","`","Tensor","`","of","string","keys","and","it","outputs","the","embedding","output","as","a","float","`","Tensor","`","."]
docstr: Constructor for DynamicEmbeddingLookup.
  
  Args:
    config: A DynamicEmbeddingConfig proto that configures the embedding.
    var_name: A unique name for the given embedding.
    service_address: The address of a knowledge bank service. If empty, the
      value passed from --kbs_address (defined in
      .../carls/dynamic_embedding_manager.cc) flag will be used instead.
    timeout_ms: Timeout millseconds for the connection. If negative, never
      timout.
  
  Raises:
    ValueError: if var_name is `None` or empty.
docstr_tok: ["Constructor","for","DynamicEmbeddingLookup",".","Args",":","config",":","A","DynamicEmbeddingConfig","proto","that","configures","the","embedding",".","var_name",":","A","unique","name","for","the","given","embedding",".","service_address",":","The","address","of","a","knowledge","bank","service",".","If","empty",",","the","value","passed","from","--","kbs_address","(","defined","in","...","\/carls\/dynamic_embedding_manager.cc",")","flag","will","be","used","instead",".","timeout_ms",":","Timeout","millseconds","for","the","connection",".","If","negative",",","never","timout",".","Raises",":","ValueError",":","if","var_name","is","`","None","`","or","empty","."]
code: def __init__(
      self,
      config: de_config_pb2.DynamicEmbeddingConfig,
      var_name: typing.Text,
      service_address: typing.Text = "",
      timeout_ms: int = -1,
  ):
      """Constructor for DynamicEmbeddingLookup.
  
      Args:
        config: A DynamicEmbeddingConfig proto that configures the embedding.
        var_name: A unique name for the given embedding.
        service_address: The address of a knowledge bank service. If empty, the
          value passed from --kbs_address (defined in
          .../carls/dynamic_embedding_manager.cc) flag will be used instead.
        timeout_ms: Timeout millseconds for the connection. If negative, never
          timout.
  
      Raises:
        ValueError: if var_name is `None` or empty.
      """
      super(DynamicEmbeddingLookup, self).__init__()
      if not var_name:
          raise ValueError("Must specify a non-empty var_name.")
  
      self.embedding_dimension = config.embedding_dimension
      context.add_to_collection(var_name, config)
      self.resource = gen_carls_ops.dynamic_embedding_manager_resource(
          config.SerializeToString(),
          var_name,
          service_address,
          timeout_ms,
      )
  
file_path: neural-structured-learning/research/carls/dynamic_embedding_ops.py
imports: import typing
  from research.carls import context
  from research.carls import dynamic_embedding_config_pb2
  from research.carls.kernels import gen_carls_ops
  import tensorflow
label_desc: Use image node_id 1 to create a new DynamicEmbeddingLookup object from inherited base classes: tf.keras.layers with example: obj = DynamicEmbeddingLookup(config, var_name, service_address, timeout_ms)