# tff.backends.mapreduce.get_state_initialization_computation

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Validates and transforms a computation to generate state.

    tff.backends.mapreduce.get_state_initialization_computation(
        initialize_computation: https://www.tensorflow.org/federated/api_docs/python/tff/framework/ConcreteComputation,
        grappler_config: tf.compat.v1.ConfigProto = _GRAPPLER_DEFAULT_CONFIG
    ) -> https://www.tensorflow.org/federated/api_docs/python/tff/Computation

<br />

<br />

<br />

| ## Args ||
|---|---|
| `initialize_computation` | A `computation_impl.ConcreteComputation` that should generate initial state for a computation that is compatible with a federated learning system that implements the contract of a backend defined in the backends/mapreduce directory. |
| `grappler_config` | An optional instance of [`tf.compat.v1.ConfigProto`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/ConfigProto) to configure Grappler graph optimization of the TensorFlow graphs. These options are combined with a set of defaults that aggressively configure Grappler. If the input `grappler_config` has `graph_options.rewrite_options.disable_meta_optimizer=True`, Grappler is bypassed. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `computation_base.Computation` that can generate state for a computation. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If the arguments are of the wrong types. |

<br />