Commit 6faa6ff6 authored by Dustin Tran's avatar Dustin Tran Committed by TensorFlower Gardener
Browse files

Support tf.colocate_with when input is Tensor-like and executing_eagerly().

Graph.colocate_with applies the private function _op_to_colocate_with, which does tensor conversions if not already an Operation. This is not true for the TF op tf.colocate_with.

This specific edge case appears in the following link. Alternative solutions are welcome.

* Pull request: https://github.com/tensorflow/tensor2tensor/pull/1182/files#diff-c7da3e2b2808bb202eddd84075267eceR265
* Aforementioned parent method: https://github.com/tensorflow/tensorflow/blob/r1.12/tensorflow/python/keras/engine/base_layer.py#L629

PiperOrigin-RevId: 219414649
parent 42e43154
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment