class_docstr: Tests for the load_and_remap_matrix() op.
docstr: Tests that errors are raised when an ID maps to multiple new IDs.
  
  (This should usually not happen when using public APIs).
docstr_tok: ["Tests","that","errors","are","raised","when","an","ID","maps","to","multiple","new","IDs",".","(","This","should","usually","not","happen","when","using","public","APIs",")","."]
code: def test_load_and_remap_invalid_remapping(self):
      """Tests that errors are raised when an ID maps to multiple new IDs.
  
      (This should usually not happen when using public APIs).
      """
      invalid_remapping = [1, 0, 0, 0, 1, 2]
  
      # Invalid row remapping.
      remapped_matrix = gen_checkpoint_ops.load_and_remap_matrix(
          ckpt_path=[self.bundle_file],
          old_tensor_name=self.old_tensor_name,
          row_remapping=invalid_remapping,
          col_remapping=[],
          initializing_values=[],
          num_rows=len(invalid_remapping),
          num_cols=self.old_num_cols,
      )
      with self.cached_session(), self.assertRaises(
          errors.UnimplementedError
      ):
          self.evaluate(remapped_matrix)
  
      # Invalid column remapping.
      remapped_matrix = gen_checkpoint_ops.load_and_remap_matrix(
          ckpt_path=[self.bundle_file],
          old_tensor_name=self.old_tensor_name,
          row_remapping=list(range(self.old_num_rows)),
          col_remapping=invalid_remapping,
          initializing_values=[],
          num_rows=self.old_num_rows,
          num_cols=len(invalid_remapping),
      )
      with self.cached_session(), self.assertRaises(
          errors.UnimplementedError
      ):
          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 7 for calling the LoadAndRemapMatrixTest obj's underlying member method code with example usage: obj.test_load_and_remap_invalid_remapping() without return types