Add slice-scatter. (#927)

* Add slice-scatter.

* Add the op.

* Make transpose be a no-op when the dimensions are identical.

* Add the backprop.

* And add some gradient test.
This commit is contained in:
Laurent Mazare
2023-09-22 12:18:16 +01:00
committed by GitHub
parent a96878f235
commit 8601537e31
5 changed files with 142 additions and 1 deletions

View File

@ -133,6 +133,7 @@ pub enum Op {
Copy(Tensor),
Broadcast(Tensor),
Narrow(Tensor, usize, usize, usize),
SliceScatter0(Tensor, Tensor, usize),
Reshape(Tensor),
ToDevice(Tensor),
Transpose(Tensor, usize, usize),