docstr: Encodes the adjustment from proposals to GT boxes using both the
  TensorFlow and the Numpy implementation.
  
  Asserts that both results are equal.
docstr_tok: ["Encodes","the","adjustment","from","proposals","to","GT","boxes","using","both","the","TensorFlow","and","the","Numpy","implementation",".","Asserts","that","both","results","are","equal","."]
code: def _encode(self, proposals, gt_boxes):
      """
      Encodes the adjustment from proposals to GT boxes using both the
      TensorFlow and the Numpy implementation.
  
      Asserts that both results are equal.
      """
      proposals_tf = tf.placeholder(tf.float32, shape=proposals.shape)
      gt_boxes_tf = tf.placeholder(tf.float32, shape=gt_boxes.shape)
  
      encoded_tf = encode_tf(proposals_tf, gt_boxes_tf)
      with self.test_session() as sess:
          encoded_tf_val = sess.run(
              encoded_tf,
              feed_dict={
                  proposals_tf: proposals,
                  gt_boxes_tf: gt_boxes,
              },
          )
  
      encoded_np = encode_np(proposals, gt_boxes)
  
      self.assertAllClose(encoded_np, encoded_tf_val)
      return encoded_np
  
file_path: luminoth/luminoth/utils/bbox_transform_test.py
imports: import numpy
  import tensorflow
  from luminoth.utils.bbox_transform import encode, decode, clip_boxes
  from luminoth.utils.bbox_transform_tf import encode, decode, clip_boxes
  from luminoth.utils.test.gt_boxes import generate_gt_boxes
label_desc: Use image node_id 2 for calling the BBoxTransformTest obj's underlying member method code with example usage: obj._encode(proposals, gt_boxes) and returns: encoded_np