Skip to content

Commit

Permalink
fix: relax input types (#1226)
Browse files Browse the repository at this point in the history
* fix: relax input types

* Update lib/LuxLib/src/api/instancenorm.jl
  • Loading branch information
avik-pal authored Jan 24, 2025
1 parent 8a1cb65 commit 94ff497
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/LuxLib/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LuxLib"
uuid = "82251201-b29d-42c6-8e01-566dec8acb11"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "1.6.0"
version = "1.6.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxLib/src/api/groupnorm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The normalized array is returned.
[1] Wu, Yuxin, and Kaiming He. "Group normalization." Proceedings of the European conference
on computer vision (ECCV). 2018.
"""
function groupnorm(x::AbstractArray{<:Real, N}, scale::Optional{<:AbstractVector},
function groupnorm(x::AbstractArray{<:Number, N}, scale::Optional{<:AbstractVector},
bias::Optional{<:AbstractVector}, groups::Int, σ::F=identity,
epsilon=default_epsilon(x)) where {F, N}
assert_valid_groupnorm_arguments(x, scale, bias, groups)
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxLib/src/api/instancenorm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end
function instancenorm(x::AbstractArray, γ::Optional{<:AbstractVector},
β::Optional{<:AbstractVector}, rμ::Optional{<:AbstractVector},
rσ²::Optional{<:AbstractVector}, training::TrainingType, σ::F=identity,
momentum::Optional{<:Real}=0.1f0, epsilon=default_epsilon(x)) where {F}
momentum::Optional{<:Number}=0.1f0, epsilon=default_epsilon(x)) where {F}
assert_valid_instancenorm_arguments(x)

y, rμₙ, rσ²ₙ = instancenorm_impl(
Expand Down

2 comments on commit 94ff497

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=lib/LuxLib

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/123690

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a LuxLib-v1.6.1 -m "<description of version>" 94ff497354cafaec4534ac9035dd18c0adbb18d5
git push origin LuxLib-v1.6.1

Please sign in to comment.