diff options
author | 2017-06-15 14:56:36 -0700 | |
---|---|---|
committer | 2017-06-16 11:21:29 -0700 | |
commit | 76a0a15cb90c370e41766d124a7a11b28c18089a (patch) | |
tree | 7a75a1368107c74a490e7d5c0966c8dd032126d1 /tensorflow/go/shape.go | |
parent | 319c847d9446f6d15675a31abb86b8a9728dcc02 (diff) |
Fix shape.go's Size function.
Fixes #10741.
Diffstat (limited to 'tensorflow/go/shape.go')
-rw-r--r-- | tensorflow/go/shape.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/go/shape.go b/tensorflow/go/shape.go index 114ab5decb..8d000cb9de 100644 --- a/tensorflow/go/shape.go +++ b/tensorflow/go/shape.go @@ -59,7 +59,7 @@ func (s Shape) NumDimensions() int { // // REQUIRES: 0 <= dim < s.NumDimensions() func (s Shape) Size(dim int) int64 { - if dim < 0 || dim > s.NumDimensions() { + if dim < 0 || dim >= s.NumDimensions() { return -1 } return s.dims[dim] |