Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TextFileInitializer (0.34 sec)

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

        for entry in vocabulary:
          f.write(entry + '\n')
      return vocabulary_file
    
    
    def test():
    
      vocabulary_file = write_vocabulary_file(['cat', 'is', 'on', 'the', 'mat'])
      table_initializer = tf.lookup.TextFileInitializer(
          vocabulary_file, tf.string, tf.lookup.TextFileIndex.WHOLE_LINE, tf.int64,
          tf.lookup.TextFileIndex.LINE_NUMBER)
      # Incur another bound_input on the asset, but with a different sym_name, i.e.,
    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/cc/saved_model/testdata/generate_saved_models.py

      def __init__(self):
        self.asset = asset.Asset(
            test.test_src_dir_path(
                "cc/saved_model/testdata/static_hashtable_asset.txt"))
        self.table = lookup_ops.StaticHashTable(
            lookup_ops.TextFileInitializer(self.asset, dtypes.string,
                                           lookup_ops.TextFileIndex.WHOLE_LINE,
                                           dtypes.int64,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 18 18:06:18 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc

        // Now, this pattern matching only supports the following case, which is
        // commonly used among inference use cases:
        //
        // tf.lookup.TextFileInitializer(
        //   "test.txt", tf.string, tf.lookup.TextFileIndex.WHOLE_LINE,
        //   tf.int64, tf.lookup.TextFileIndex.LINE_NUMBER, delimiter=" ")
        //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/quantize_model_test_base.py

        # The resulting table looks like:
        # "static" -> 0
        # "range" -> 1
        # "quantization" -> 2
        # default -> -1
        init = lookup_ops.TextFileInitializer(
            filename=asset_file,
            key_dtype=dtypes.string,
            key_index=lookup_ops.TextFileIndex.WHOLE_LINE,
            value_dtype=dtypes.int64,
            value_index=lookup_ops.TextFileIndex.LINE_NUMBER,
    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