我从朱莉娅运行这个:
W1 = param(rand(3, 5))
b1 = param(rand(3))
layer1(x) = W1 * x .+ b1
W2 = param(rand(2, 3))
b2 = param(rand(2))
layer2(x) = W2 * x .+ b2
model(x) = layer2(σ.(layer1(x)))
model(rand(5))
我收到此错误:
ERROR: UndefVarError: σ not defined
Stacktrace:
[1] model(::Array{Float64,1}) at ./REPL[35]:1
我不明白这个错误。我是朱莉娅的新手。请帮帮我。我正在关注本教程:https ://fluxml.github.io/Flux.jl/stable/models/basics.html#Taking-Gradients-1
谢谢你。