Missed TensorFlow World? Check out the recap. Learn more


    min_slice_size=(256 << 10),

Defined in tensorflow/python/ops/partitioned_variables.py.

See the guide: Variables > Variable Partitioners for Sharding

Partitioner to allocate minimum size per slice.

Returns a partitioner that partitions the variable of given shape and dtype such that each partition has a minimum of min_slice_size slice of the variable. The maximum number of such partitions (upper bound) is given by max_partitions.


  • max_partitions: Upper bound on the number of partitions. Defaults to 1.
  • axis: Axis along which to partition the variable. Defaults to 0.
  • min_slice_size: Minimum size of the variable slice per partition. Defaults to 256K.
  • bytes_per_string_element: If the Variable is of type string, this provides an estimate of how large each scalar in the Variable is.


A partition function usable as the partitioner argument to variable_scope, get_variable, and get_partitioned_variable_list.