Skip to content

Commit 2540027

Browse files
Update functor.jl
1 parent 85c17ee commit 2540027

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/functor.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ function params!(p::Params, x, seen = IdSet())
4848
end
4949
end
5050

51+
"""
52+
params(model)
53+
54+
Given a model or specific layers from a model, return the trainable parameters
55+
such that they can be used as input to the `train!` function.
56+
"""
5157
function params(m...)
5258
ps = Params()
5359
params!(ps, m)

0 commit comments

Comments
 (0)