diff options
author | Karmel Allison <karmel@google.com> | 2018-08-24 11:04:10 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-24 11:11:19 -0700 |
commit | 851674874aac61c4a6e4cced1917b5dbe033980a (patch) | |
tree | 97807963e6d945e78e75b59d52852aa09a09dc19 | |
parent | 388cdfeb25043fb8ba4541ce6874b9a7ad965810 (diff) |
Automated rollback of commit 73c7768904554b5b2b6420556b52bfaf43453423. Revert #19792.
PiperOrigin-RevId: 210124433
-rw-r--r-- | tensorflow/python/kernel_tests/matmul_op_test.py | 4 | ||||
-rw-r--r-- | tensorflow/python/ops/math_ops.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/kernel_tests/matmul_op_test.py b/tensorflow/python/kernel_tests/matmul_op_test.py index 9eaafb4435..b167278984 100644 --- a/tensorflow/python/kernel_tests/matmul_op_test.py +++ b/tensorflow/python/kernel_tests/matmul_op_test.py @@ -142,7 +142,7 @@ class MatMulStatsTest(test_lib.TestCase): for op in g.get_operations(): flops = ops.get_stats_for_node_def(g, op.node_def, "flops").value if op.name == "MatMul": - self.assertEqual(6975, flops) + self.assertEqual(7200, flops) def testTransposedStatistics(self): g = ops.Graph() @@ -153,7 +153,7 @@ class MatMulStatsTest(test_lib.TestCase): for op in g.get_operations(): flops = ops.get_stats_for_node_def(g, op.node_def, "flops").value if op.name == "MatMul": - self.assertEqual(6975, flops) + self.assertEqual(7200, flops) try: diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py index 0a31bd51dd..9b0ab00c7a 100644 --- a/tensorflow/python/ops/math_ops.py +++ b/tensorflow/python/ops/math_ops.py @@ -2072,7 +2072,7 @@ def _calc_mat_mul_flops(graph, node): output_shape = graph_util.tensor_shape_from_node_def_name(graph, node.name) output_shape.assert_is_fully_defined() output_count = np.prod(output_shape.as_list()) - return ops.OpStats("flops", ((2 * k - 1) * output_count)) + return ops.OpStats("flops", (k * output_count * 2)) def _as_indexed_slices(x, optimize=True): |