class_docstr: Tests for the load_and_remap_matrix() op.
docstr: Tests the op's load and remap where there are no missing entries.
docstr_tok: ["Tests","the","op","'s","load","and","remap","where","there","are","no","missing","entries","."]
code: def test_load_and_remap_no_missing(self):
      """Tests the op's load and remap where there are no missing entries."""
  
      # No column remapping, new weight matrix has second row, then first row.
      row_remapping = [1, 0]
      remapped_matrix = gen_checkpoint_ops.load_and_remap_matrix(
          ckpt_path=[self.bundle_file],
          old_tensor_name=self.old_tensor_name,
          row_remapping=row_remapping,
          col_remapping=[],
          initializing_values=[],
          num_rows=2,
          num_cols=self.old_num_cols,
      )
      with self.cached_session():
          self.assertAllClose(
              self.matrix_value[row_remapping],
              self.evaluate(remapped_matrix),
          )
  
      # No row remapping, new weight matrix has third col, then first col.
      row_remapping = list(range(self.old_num_rows))
      col_remapping = [2, 0]
      remapped_matrix = gen_checkpoint_ops.load_and_remap_matrix(
          ckpt_path=[self.bundle_file],
          old_tensor_name=self.old_tensor_name,
          row_remapping=row_remapping,
          col_remapping=col_remapping,
          initializing_values=[],
          num_rows=len(row_remapping),
          num_cols=len(col_remapping),
      )
      with self.cached_session():
          self.assertAllClose(
              self.matrix_value[row_remapping][:, col_remapping],
              self.evaluate(remapped_matrix),
          )
  
      # Both row and column remappings.
      row_remapping = [1, 0, 4]
      col_remapping = [1, 15]
      remapped_matrix = gen_checkpoint_ops.load_and_remap_matrix(
          ckpt_path=[self.bundle_file],
          old_tensor_name=self.old_tensor_name,
          row_remapping=row_remapping,
          col_remapping=col_remapping,
          initializing_values=[],
          num_rows=len(row_remapping),
          num_cols=len(col_remapping),
      )
      with self.cached_session():
          self.assertAllClose(
              self.matrix_value[row_remapping][:, col_remapping],
              self.evaluate(remapped_matrix),
          )
  
imports: import os
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gen_checkpoint_ops
  from tensorflow.python.ops import partitioned_variables
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import flags
  from tensorflow.python.platform import test
  from tensorflow.python.training import saver
label_desc: Use image node_id 2 for calling the LoadAndRemapMatrixTest obj's underlying member method code with example usage: obj.test_load_and_remap_no_missing() without return types