Skip to content

docs - add separate usage example for activations() #1173

@obviousnic

Description

@obviousnic

A minor issue in the docs for the activations() function in src/layers/basic.jl.

If a beginner following the previous examples in the docs, e.g.
loss(x, y) = crossentropy(m(x), y) + sum(norm, params(m))
and substituting activations() for params(), this will
result in the forward pass being computed twice, once when the model is evaluated, and again when activations is called.

The doc entry for activations() could provide an example or comment to emphasize that the model should not be called except through activations() itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions