Skip to content

Commit

Permalink
Merge pull request #185 from JuliaGNI/compathelper/new_version/2025-0…
Browse files Browse the repository at this point in the history
…2-06-11-33-12-211-02093367789

CompatHelper: bump compat for AbstractNeuralNetworks to 0.6, (keep existing compat)
  • Loading branch information
michakraus authored Feb 14, 2025
2 parents 0545a13 + 1e9bf1f commit 0f3c5a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ UpdateJulia = "770da0de-323d-4d28-9202-0e205c1e0aff"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
AbstractNeuralNetworks = "0.5"
AbstractNeuralNetworks = "0.5, 0.6"
BandedMatrices = "1"
ChainRules = "1"
ChainRulesCore = "1"
Expand Down Expand Up @@ -60,12 +60,12 @@ ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
GeometricEquations = "c85262ba-a08a-430a-b926-d29770767bf2"
GeometricIntegrators = "dcce2d33-59f6-5b8d-9047-0defad88ae06"
GeometricProblems = "18cb22b4-ad41-5c80-9c5f-710df63fbdc9"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RungeKutta = "fb486d5c-30a0-4a8a-8415-a8b4ace5a6f7"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
GeometricIntegrators = "dcce2d33-59f6-5b8d-9047-0defad88ae06"

[targets]
test = ["Documenter", "ChainRulesTestUtils", "Random", "SafeTestsets", "Test", "GeometricProblems", "FiniteDifferences", "GeometricIntegrators"]
1 change: 1 addition & 0 deletions docs/src/tutorials/grassmann_layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ So we use `Zygote` [Zygote.jl-2018](@cite) to compute ``\nabla_\theta\mathcal{NN
```@example rosenbrock
import CairoMakie # hide
CairoMakie.activate!() # hide
using GeometricMachineLearning: params # hide
# note the small number of training steps
const training_steps = 80
loss_array = zeros(training_steps)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function check_setup(A::AbstractMatrix{T}, tol=T(10)*eps(T)) where T
@test check(A) < tol
end
check_setup(ps::NamedTuple) = apply_toNT(check_setup, ps)
check_setup(ps::NeuralNetworkParameters) = check_setup(ps.params)
check_setup(ps::NeuralNetworkParameters) = check_setup(GeometricMachineLearning.params(ps))

@doc raw"""
This checks for an arbitrary matrix ``B\in\mathbb{R}^{N\times{}N}`` if ``B\in\mathfrak{g}^\mathrm{hor}``.
Expand All @@ -29,7 +29,7 @@ Check if `initialparameters` and `init_optimizer_cache` do the right thing for `
"""
function check_multi_head_attention_stiefel_setup(T::Type, N::Int, n::Int)
model = Chain(MultiHeadAttention(N, n, Stiefel=true))
ps = NeuralNetwork(model, KernelAbstractions.CPU(), T).params
ps = GeometricMachineLearning.params(NeuralNetwork(model, KernelAbstractions.CPU(), T))

check_setup(ps)

Expand Down

0 comments on commit 0f3c5a0

Please sign in to comment.