Change placeholder exception to log instead of throwing an exception.

It is difficult to remove placeholders from existing meta-graphs without breaking other structures.  As long as the placeholders do not contribute towards the loss/evaluation function they are harmless.

PiperOrigin-RevId: 180963420
This commit is contained in:
Russell Power 2018-01-05 12:51:39 -08:00 committed by TensorFlower Gardener
parent a17038297c
commit 620c838312

View File

@ -142,8 +142,9 @@ class TPUReplicateContext(control_flow_ops.XLAControlFlowContext):
def _AddOpInternal(self, op):
# pylint: disable=protected-access
if op.type in _BLACKLISTED_OPS:
raise ValueError("Operation of type %s (%s) is not supported on the TPU" %
(op.type, op.name))
logging.error("Operation of type %s (%s) is not supported on the TPU. "
"Execution will fail if this op is used in the graph. " %
(op.type, op.name))
if op.type in _NOT_IMPLEMENTED_OPS:
self._unsupported_ops.append(op)