Skip to content
This repository was archived by the owner on May 21, 2022. It is now read-only.

Commit aa05015

Browse files
committed
dfa backprop last affine
1 parent a053105 commit aa05015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chain.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Chain{T,TR<:Transformation}(::Type{T}, ts::AbstractVector{TR};
2828
if grad_calc == :dfa
2929
for (i,t) in enumerate(ts)
3030
= params_length(t)
31-
Bi = if== 0 || i == length(ts)
31+
Bi = if== 0 || i >= length(ts)-1
3232
# don't do anything for non-learnable transformations,
3333
# or the final transformation (we'll just backprop that one)
3434
Nullable{Matrix{T}}()

0 commit comments

Comments
 (0)