class_docstr: Attention net.  See file docstring.
class_docstr_tok: ["Attention","net",".","See","file","docstring","."]
code: def encode_knowledge_bottom(self, features):
      tf.logging.info("Encoding knowledge " + str(self.triple_num))
      # Make sure this is embeddings for triples
      # <tf.float32>[batch_size, triple_num*max_triple_length, 1, emb_dim]
      fact_embedding = features["encoded_triples"]
      # [batch_size, triple_num*max_triple_length, emb_dim]
      fact_embedding = tf.squeeze(fact_embedding, 2)
  
      kb_shape = common_layers.shape_list(fact_embedding)
      batch_size = kb_shape[0]
      embed_dim = kb_shape[2]
      # <tf.float32>[batch_size*triple_num, max_triple_length, emb_dim]
      re_fact_embedding = tf.reshape(
          fact_embedding,
          [batch_size * self.triple_num, -1, embed_dim],
          name="reshape_fact_embedding",
      )
  
      # <tf.int64>[batch_size, triple_num]
      input_fact_lengths = features["triple_lens"]
      # Stack the fact lengths.
      # <tf.int64>[batch_size*max_triple_num]
      re_fact_lengths = tf.reshape(
          input_fact_lengths,
          [batch_size * self.triple_num, 1],
          name="reshape_fact_lengths",
      )
  
      return re_fact_embedding, re_fact_lengths
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 3 for calling the NeuralAssistant obj's underlying member method code with example usage: obj.encode_knowledge_bottom(features) and returns: re_fact_embedding,  re_fact_lengths