ERROR: UndefVarError: `ADAM` not defined in `Main` in flux

Hi, i get this error when try to using flux
julia> using Pkg

julia> Pkg.add(“Flux”)
Resolving package versions…
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Project.toml
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Manifest.toml

julia> Pkg.add(“Images”)
Resolving package versions…
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Project.toml
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Manifest.toml

julia> Pkg.add(“BSON”)
Resolving package versions…
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Project.toml
No Changes to C:\Users\lbtvi\.julia\environments\v1.11\Manifest.toml

julia> using Flux

julia> using Flux.Optimise
julia> using BSON

julia> using Images

julia> # Khai báo biến cho tối ưu hóa

julia> opt = ADAM(0.001) # Khai báo tối ưu hóa ADAM với learning rate là 0.001
ERROR: UndefVarError: ADAM not defined in Main
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name may be made accessible by importing Optimisers in the current active module Main
Stacktrace:
[1] top-level scope
@ REPL[10]:1

julia>

julia> # Huấn luyện mô hình

julia> @epochs 10 Flux.train!(loss, params(model), data, opt) # Huấn luyện mô hình
ERROR: LoadError: UndefVarError: @epochs not defined in Main
Suggestion: check for spelling errors or missing imports.
in expression starting at REPL[12]:1

julia> using Flux: @epochs # Nhập @epochs từ Flux
WARNING: could not import Flux.@epochs into Main

julia>
How can i fix this, thanks alot

This means you are following a guide for a very old version of Flux. Can you provide a link?

The current version spells this Adam, but also no longer has @epochs, and strongly discourages Flux.params(model). It should look more like this.