# tf.colocate_with

<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/framework/ops.py#L5218-L5222) |

DEPRECATED FUNCTION

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.colocate_with(
        op, ignore_existing=False
    )

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Colocations handled automatically by placer.