From 7c88788e63f3a747d2794175076db551d768734e Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sun, 13 May 2018 14:26:06 +0000 Subject: [PATCH] Shape validation of `max_features` in `QuantizedReluX` In shape function of QuantizedReluX, `max_value` and `min_features` have shape validation but not `max_features`. This fix add restriction to `max_features` as well. Signed-off-by: Yong Tang --- tensorflow/core/ops/nn_ops.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/core/ops/nn_ops.cc b/tensorflow/core/ops/nn_ops.cc index bb46daf..7c579db 100644 --- a/tensorflow/core/ops/nn_ops.cc +++ b/tensorflow/core/ops/nn_ops.cc @@ -1452,6 +1452,7 @@ REGISTER_OP("QuantizedReluX") ShapeHandle unused; TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused)); TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 0, &unused)); + TF_RETURN_IF_ERROR(c->WithRank(c->input(3), 0, &unused)); c->set_output(1, c->Scalar()); c->set_output(2, c->Scalar()); return Status::OK(); -- 2.7.4