This commit is contained in:
sorki 2023-12-08 20:05:06 +01:00 committed by Erik de Castro Lopo
parent 766b962341
commit 83cb4e4ec2

View File

@ -53,7 +53,7 @@ instance (KnownNat i, KnownNat o) => Layer (FullyConnected i o) ('D1 i) ('D1 o)
runBackwards (FullyConnected (FullyConnected' _ wN) _) x (S1D dEdy) = runBackwards (FullyConnected (FullyConnected' _ wN) _) x (S1D dEdy) =
let wB' = dEdy let wB' = dEdy
mm' = dEdy `outer` x mm' = dEdy `outer` x
-- calcluate derivatives for next step -- calculate derivatives for next step
dWs = tr wN #> dEdy dWs = tr wN #> dEdy
in (FullyConnected' wB' mm', S1D dWs) in (FullyConnected' wB' mm', S1D dWs)