提交 557916fa 编写于 作者: F Feng Liu 提交者: TensorFlower Gardener

Fuse the back to back tfr.cast with unranked input to tf.EnsureShape

After this step, all the tfr ops should be raised to the tf ops

PiperOrigin-RevId: 317756602
Change-Id: I15731f231caf6c47eac1719fc1c2ed3d01cff515
上级 a26044ac
......@@ -2806,6 +2806,27 @@ the corresponding feature.
TF_DerivedOperandSizeAttr N = TF_DerivedOperandSizeAttr<0>;
}
def TF_EnsureShapeOp : TF_Op<"EnsureShape", [NoSideEffect]> {
let summary = "Ensures that the tensor's shape matches the expected shape.";
let description = [{
Raises an error if the input tensor's shape does not match the specified shape.
Returns the input tensor otherwise.
}];
let arguments = (ins
TF_Tensor:$input,
TF_ShapeAttr:$shape
);
let results = (outs
TF_Tensor:$output
);
TF_DerivedOperandTypeAttr T = TF_DerivedOperandTypeAttr<0>;
}
def TF_EqualOp : TF_Op<"Equal", [Commutative, NoSideEffect]> {
let summary = "Returns the truth value of (x == y) element-wise.";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册