diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-10-27 12:15:56 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-10-27 12:23:32 -0700 |
commit | 3d39b32b9a7833807dad037c3f57c818e9251f85 (patch) | |
tree | da64968fc8cdb0e8a7a0cc3ed106ab7f69daf619 /tensorflow/python/profiler | |
parent | 73155f56a30c75eb54d95ab0d51ab8b5c8fb02c9 (diff) |
Fix a tfprof bug. Throws an error when the flops cannot be calculated.
PiperOrigin-RevId: 173702740
Diffstat (limited to 'tensorflow/python/profiler')
-rw-r--r-- | tensorflow/python/profiler/internal/flops_registry.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/python/profiler/internal/flops_registry.py b/tensorflow/python/profiler/internal/flops_registry.py index e143501049..147711b1d9 100644 --- a/tensorflow/python/profiler/internal/flops_registry.py +++ b/tensorflow/python/profiler/internal/flops_registry.py @@ -373,6 +373,7 @@ def _max_pool_grad_flops(graph, node): kernel_area = _list_product(kernel_shape) orig_out_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[1]) + orig_out_shape.assert_is_fully_defined() max_pool_ops = kernel_area * orig_out_shape.num_elements() return ops.OpStats("flops", max_pool_ops + orig_out_shape.num_elements()) |