Merge pull request #25535 from lgeiger:inv-non-monotonic

PiperOrigin-RevId: 233138653
This commit is contained in:
TensorFlower Gardener 2019-02-08 16:43:50 -08:00
commit 14554b2371

View File

@ -176,8 +176,7 @@ bool IsElementWiseMonotonic(const NodeDef& node, bool* is_non_decreasing) {
"Sign", "Sinh", "Softsign", "Softplus", "Sqrt", "Tanh",
}));
static const gtl::FlatSet<string>* const kMonotonicNonIncreasingOps =
CHECK_NOTNULL((new gtl::FlatSet<string>{"Acos", "Erfc", "Inv", "Neg",
"Reciprocal", "Rsqrt"}));
CHECK_NOTNULL((new gtl::FlatSet<string>{"Acos", "Erfc", "Neg", "Rsqrt"}));
if (kMonotonicNonDecreasingOps->count(node.op()) > 0) {
if (is_non_decreasing) {
*is_non_decreasing = true;