Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for StaticVocabularyTable (0.15 sec)

  1. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/hash_table_asset_v1.py

          tf.lookup.TextFileIndex.LINE_NUMBER)
      # Incur another bound_input on the asset, but with a different sym_name, i.e.,
      # __tf_saved_model_asset1_tokens.txt vs. __tf_saved_model_asset0_tokens.txt.
      table = tf.lookup.StaticVocabularyTable(table_initializer, num_oov_buckets=10)
      vocab_file_tensor = tf.convert_to_tensor(
          vocabulary_file, tf.string, name='asset_filepath')
      tf.add_to_collection(tf.GraphKeys.ASSET_FILEPATHS, vocab_file_tensor)
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:49:35 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test_base.py

        """Creates a simple model that initializes a table from an asset file.
    
        This model creates an asset file at "vocab_file.txt" containing
        comma-separated vocabularies and uses it to initialize a
        `StaticVocabularyTable`. For inference, the model performs a lookup with a
        1D string tensor input vocabs.
    
        Args:
          sess: Tensorflow Session to create the model in.
    
        Returns:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 21 08:51:46 UTC 2024
    - 51.2K bytes
    - Viewed (0)
Back to top