Open ashnair1 opened 2 years ago
You can do something like:
import (
"gorgonia.org/tensor"
)
...
s, err := x.Slice(tensor.S(0), nil, nil) // x[0, :, :]
if err != nil { ... }
tensor.Copy(s, y) // Note: dst, src.
s, err := x.Slice(tensor.S(1), nil, nil) // x[1, :, :]
if err != nil { ... }
tensor.Copy(s, z)
...
Given an array
x
of shape(3, 100, 100)
, does gorgonia/tensor have a way to dowhere w, y and z are of shape
(100, 100)