tf.train.experimental.MaxShardSizePolicy.MaxShardSizePartitioner

Partition tensors into shards with a max shard size.

Methods

get_shards

View source

Callback to split tensors into shards with a max shard size.

Args
max_shard_size The maximum size of a shard file in bytes.
shardable_tensors A list of ShardableTensors.

Returns
List of shard dicts containing tensors. [ {checkpoint key: {slice_spec: tensor} } ]