Skip to content

Commit b391694

Browse files
committed
Move the utilities file to Layers
1 parent b2ec1d6 commit b391694

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Metalhead.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ using Random
1313

1414
import Functors
1515

16-
# Utilities
17-
include("utilities.jl")
16+
# Model utilities
1817
include("core.jl")
1918

2019
# Custom Layers
2120
include("layers/Layers.jl")
21+
include("layers/utilities.jl") # layer utilities
2222
using .Layers
2323

2424
# CNN models

src/layers/Layers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Random
1212

1313
import Flux.testmode!
1414

15-
include("../utilities.jl")
15+
include("utilities.jl")
1616

1717
include("attention.jl")
1818
export MultiHeadSelfAttention

src/utilities.jl renamed to src/layers/utilities.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ end
1414
1515
Convenience function for applying an activation function to the output after
1616
summing up the input arrays. Useful as the `connection` argument for the block
17-
function in [`Metalhead.resnet`](@ref).
17+
function in `Metalhead.resnet`.
1818
"""
1919
addact(activation = relu, xs...) = activation(sum(xs))
2020

2121
"""
2222
actadd(activation = relu, xs...)
2323
24-
Convenience function for adding input arrays after applying an activation
25-
function to them. Useful as the `connection` argument for the block function in
26-
[`Metalhead.resnet`](@ref).
24+
Convenience function for summing up the input arrays after applying an
25+
activation function to them. Useful as the `connection` argument for the block
26+
function in `Metalhead.resnet`.
2727
"""
2828
actadd(activation = relu, xs...) = sum(activation.(x) for x in xs)
2929

0 commit comments

Comments
 (0)