class_docstr: Tests for the generate_vocab_remapping() method.
docstr: Tests where old_vocab_size is specified.
docstr_tok: ["Tests","where","old_vocab_size","is","specified","."]
code: def test_generate_remapping_with_old_vocab_size(self):
      """Tests where old_vocab_size is specified."""
      (
          remapping,
          num_present,
      ) = gen_checkpoint_ops.generate_vocab_remapping(
          new_vocab_file=self.new_vocab_file,
          old_vocab_file=self.old_vocab_file,
          num_new_vocab=3,
          new_vocab_offset=0,
          # Old vocabulary becomes ['knitting', 'eminem'].
          old_vocab_size=2,
      )
      expected_remapping = [-1, 0, 1]
      expected_num_present = 2
      with self.cached_session():
          self.assertAllEqual(
              expected_remapping, self.evaluate(remapping)
          )
          self.assertAllEqual(
              expected_num_present, self.evaluate(num_present)
          )
  
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 5 for calling the GenerateVocabRemappingTest obj's underlying member method code with example usage: obj.test_generate_remapping_with_old_vocab_size() without return types