Skip to content

Commit cd1235e

Browse files
committed
accepts weights in wh
1 parent 270e194 commit cd1235e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/wh.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ function wh_learn(
1414
throw(ArgumentError("X($(size(inputs,1))) and Y($(size(outputs,1))) length doesn't match"))
1515
end
1616

17-
W = zeros(Float64, (size(X,2), size(Y,2)))
17+
if isnothing(weights)
18+
W = zeros(Float64, (size(X,2), size(Y,2)))
19+
else
20+
W = weights
21+
end
22+
1823
inputT = Matrix{Float64}(undef, (size(X,2), 1))
1924
pred = Matrix{Float64}(undef, (1, size(Y,2)))
2025
deltaW = Matrix{Float64}(undef, (size(X,2), size(Y,2)))

0 commit comments

Comments
 (0)