hikettei / cl-waffe2

[Experimental] Graph and Tensor Abstraction for Deep Learning all in Common Lisp
https://hikettei.github.io/cl-waffe2/
MIT License
124 stars 5 forks source link

[BugFix] The function permute* produces side effects and stride/shape/view is destructed. #35

Closed hikettei closed 1 year ago

hikettei commented 1 year ago

When calling permute*, someone has to make a copy of strides/shapes/view of given tensors, because shuffling orders also modify the given tensor. This pull request fixed the problem and accordingly deleted the re-compiling of the gradient adder.

I've confirmed all tests passed without SegFault, and a simple three-layer MLP model is now working well.