# tf.fixed_size_partitioner

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/partitioned_variables.py#L221-L237) |

Partitioner to specify a fixed number of shards along given axis.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.fixed_size_partitioner`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/fixed_size_partitioner)

<br />

    tf.fixed_size_partitioner(
        num_shards, axis=0
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `num_shards` | `int`, number of shards to partition variable. |
| `axis` | `int`, axis to partition on. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A partition function usable as the `partitioner` argument to `variable_scope` and `get_variable`. ||

<br />