diff options
Diffstat (limited to 'tensorflow/go/tensor.go')
-rw-r--r-- | tensorflow/go/tensor.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/go/tensor.go b/tensorflow/go/tensor.go index 8b8909a6f8..a534a0d659 100644 --- a/tensorflow/go/tensor.go +++ b/tensorflow/go/tensor.go @@ -100,7 +100,7 @@ func NewTensor(value interface{}) (*Tensor, error) { } } else { e := stringEncoder{offsets: buf, data: raw[nflattened*8 : len(raw)], status: newStatus()} - if e.encode(reflect.ValueOf(value)); err != nil { + if err := e.encode(reflect.ValueOf(value)); err != nil { return nil, err } if int64(buf.Len()) != nflattened*8 { |