num.cr
num.cr copied to clipboard
Scientific computing in pure Crystal
#### Code Sample, a copy-pastable example if possible ```crystal # Your code here ``` #### Problem description [this should explain **why** the current behaviour is a problem and why the...
@christopherzimmerman, this fixes grad backpropagation for addition/subtraction when broadcast occurs because one operand has a different rank than the other. * Modified Add/Sub gates to sub-class the `TwoOpGate` * Made...
#### Code Sample, a copy-pastable example if possible ```crystal require "num" include Num alias RT64 = Tensor(Float64, CPU(Float64)) alias CT64 = Tensor(Complex, CPU(Complex)) complexMatrix = RT64.random(0.0..1.0, [3, 8]) realVector =...