gorgonia / tensor

package tensor provides efficient and generic n-dimensional arrays in Go that are useful for machine learning and deep learning purposes
Apache License 2.0
362 stars 49 forks source link

Bug in reduce operations for views #111

Closed chewxy closed 3 years ago

chewxy commented 3 years ago

When I was doing this livestream, I caught a bug:

T := tensor.New(tensor.WithShape(4,4), tensor.Range(tensor.Int, 0,16))
S, _ := T.Slice(S(1, 4), S(1,4))=
s, _ := Sum(S) // wrong value