Update StopGradients's overly strict verification

Subtypes may differ and we may have dynamic shapes, so don't require static
type equality.

PiperOrigin-RevId: 312475863
Change-Id: I4dd6fef11ece9e1e62560e411ca758e848964330
This commit is contained in:
Jacques Pienaar 2020-05-20 07:11:58 -07:00 committed by TensorFlower Gardener
parent 01b38cd7c6
commit e18c52cd16
1 changed files with 3 additions and 2 deletions

View File

@ -8317,8 +8317,9 @@ def TF_StackV2Op : TF_Op<"StackV2", []> {
);
}
def TF_StopGradientOp : TF_Op<"StopGradient", [NoSideEffect, SameOperandsAndResultType]> {
let summary = "Stops gradient computation.";
def TF_StopGradientOp : TF_Op<"StopGradient",
[NoSideEffect, TF_AllTypesMatch<["input", "output"]>]> {
let summary = "Stops gradient computation";
let description = [{
When executed in a graph, this op outputs its input tensor as-is.