Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for GFile (0.02 sec)

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

    
    def write_vocabulary_file(vocabulary):
      """Write temporary vocab file for module construction."""
      tmpdir = tempfile.mkdtemp()
      vocabulary_file = os.path.join(tmpdir, 'tokens.txt')
      with tf.io.gfile.GFile(vocabulary_file, 'w') as f:
        for entry in vocabulary:
          f.write(entry + '\n')
      return vocabulary_file
    
    
    def test():
    
      vocabulary_file = write_vocabulary_file(['cat', 'is', 'on', 'the', 'mat'])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 31 08:49:35 UTC 2023
    - 3.2K bytes
    - Viewed (0)
Back to top