class_docstr: Class that contains the common layers for language modeling -
          word embeddings and projection layer
docstr: Define the input word embedding layer
  Args:
      input_placeholder_tokens: tf.placeholder, input to the model
      word_embeddings: numpy array (optional), to initialize the embeddings with
      embeddings_trainable: boolean, whether or not to train the embedding table
  
  Returns:
      Embeddings corresponding to the data in input placeholder
docstr_tok: ["Define","the","input","word","embedding","layer","Args",":","input_placeholder_tokens",":","tf.placeholder",",","input","to","the","model","word_embeddings",":","numpy","array","(","optional",")",",","to","initialize","the","embeddings","with","embeddings_trainable",":","boolean",",","whether","or","not","to","train","the","embedding","table","Returns",":","Embeddings","corresponding","to","the","data","in","input","placeholder"]
code: def define_input_layer(
      self,
      input_placeholder_tokens,
      word_embeddings,
      embeddings_trainable=True,
  ):
      """
      Define the input word embedding layer
      Args:
          input_placeholder_tokens: tf.placeholder, input to the model
          word_embeddings: numpy array (optional), to initialize the embeddings with
          embeddings_trainable: boolean, whether or not to train the embedding table
  
      Returns:
          Embeddings corresponding to the data in input placeholder
      """
      with tf.device("/cpu:0"):
          with tf.variable_scope("embedding_layer", reuse=False):
              if word_embeddings is None:
                  initializer = tf.initializers.random_normal(0, 0.01)
              else:
                  initializer = tf.constant_initializer(word_embeddings)
              self.word_embeddings_tf = tf.get_variable(
                  "embedding_table",
                  shape=[self.num_words, self.n_features_in],
                  initializer=initializer,
                  trainable=embeddings_trainable,
              )
  
              input_embeddings = tf.nn.embedding_lookup(
                  self.word_embeddings_tf, input_placeholder_tokens
              )
      return input_embeddings
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.keras.layers import Wrapper
  from tensorflow.python.layers.convolutional import Conv1D
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.keras.engine.base_layer import Layer
  from tensorflow.python.eager import context
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.keras import initializers
  from tensorflow.python.keras.engine.base_layer import InputSpec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.framework import ops
label_desc: Use image node_id 2 for calling the CommonLayers obj's underlying member method code with example usage: obj.define_input_layer(input_placeholder_tokens, word_embeddings, embeddings_trainable) and returns: input_embeddings