import tensorflow as tf

        # Create clones.
        for i in range(0, config.num_clones):
            with tf.name_scope(config.clone_scope(i)) as clone_scope:
                clone_device = config.clone_device(i)
                with tf.device(clone_device):
                    with tf.variable_scope(tf.get_variable_scope(),
                                           reuse=True if i > 0 else None):
                        outputs = model_fn(*args, **kwargs)
