diff options
author | 2016-12-05 10:50:58 -0800 | |
---|---|---|
committer | 2016-12-05 11:06:55 -0800 | |
commit | 8a5dae396113655db2e4b16fe344dda4dca54994 (patch) | |
tree | 86024e08cf159e88d020017655bbe6006fc50f65 /tensorflow/contrib/specs | |
parent | 1e8ce51f43f5a3811740520d5a6205003e9665c2 (diff) |
Adds VariableV2 with a sane shape_fn.
Change: 141071094
Diffstat (limited to 'tensorflow/contrib/specs')
-rw-r--r-- | tensorflow/contrib/specs/python/summaries.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/specs/python/summaries.py b/tensorflow/contrib/specs/python/summaries.py index 27f3bb32d7..a0d56cd97a 100644 --- a/tensorflow/contrib/specs/python/summaries.py +++ b/tensorflow/contrib/specs/python/summaries.py @@ -156,7 +156,7 @@ def tf_num_params(x): if isinstance(x, tf.Tensor): shape = x.get_shape() x = x.op - if x.type == "Variable": + if x.type in ["Variable", "VariableV2"]: return shape.num_elements() totals = [tf_num_params(y) for y in x.inputs] return sum(totals) |