def testShardedFileName(self): with tf.Session( target="", config=tf.ConfigProto(device_count={"CPU": 2})): self.assertEqual(gen_io_ops._sharded_filename("foo", 4, 100).eval(), b"foo-00004-of-00100") self.assertEqual(gen_io_ops._sharded_filespec("foo", 100).eval(), b"foo-?????-of-00100")
def sharded_filename(self, filename_tensor, shard, num_shards): """Append sharding information to a filename. Args: filename_tensor: a string tensor. shard: integer. The shard for the filename. num_shards: an int Tensor for the number of shards. Returns: A string tensor. """ return gen_io_ops._sharded_filename(filename_tensor, shard, num_shards)
def sharded_filename(self, filename_tensor, shard, num_shards): """Append sharding information to a filename. Args: filename_tensor: a string tensor. shard: integer. The shard for the filename. num_shards: an int Tensor for the number of shards. Returns: A string tensor. """ return gen_io_ops._sharded_filename(filename_tensor, shard, num_shards)
def sharded_filename(self, filename_tensor, shard, num_shards): """Append sharding information to a filename. Args: filename_tensor: A string tensor. shard: Integer. The shard for the filename. num_shards: An int Tensor for the number of shards. Returns: A string tensor. """ # pylint: disable=protected-access return gen_io_ops._sharded_filename(filename_tensor, shard, num_shards)