Skip to content

Commit

Permalink
fixing kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinuzziFrancesco committed Nov 5, 2024
1 parent e55609e commit 880bcdd
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions src/indrnn_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Flux.@layer IndRNNCell

"""
function IndRNNCell((in, out)::Pair, σ=relu;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function IndRNNCell((in, out)::Pair, σ=relu;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -49,10 +49,10 @@ end
Flux.@layer :expand IndRNN

"""
IndRNN((in, out)::Pair, σ = tanh; bias = true, init = glorot_uniform)
IndRNN((in, out)::Pair, σ = tanh; kwargs...)
"""
function IndRNN((in, out)::Pair, σ = tanh; bias = true, init = glorot_uniform)
cell = IndRNNCell(in => out, σ; bias=bias, init=init)
function IndRNN((in, out)::Pair, σ = tanh; kwargs...)
cell = IndRNNCell(in => out, σ; kwargs...)
return IndRNN(cell)
end

Expand Down
12 changes: 6 additions & 6 deletions src/lightru_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Flux.@layer LightRUCell

"""
LightRUCell((in, out)::Pair, σ=tanh;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function LightRUCell((in, out)::Pair, σ=tanh;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -57,10 +57,10 @@ end
Flux.@layer :expand LightRU

"""
LightRU((in, out)::Pair; init = glorot_uniform, bias = true)
LightRU((in, out)::Pair; kwargs...)
"""
function LightRU((in, out)::Pair; init = glorot_uniform, bias = true)
cell = LightRUCell(in => out; init, bias)
function LightRU((in, out)::Pair; kwargs...)
cell = LightRUCell(in => out; kwargs...)
return LightRU(cell)
end

Expand Down
12 changes: 6 additions & 6 deletions src/ligru_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Flux.@layer LiGRUCell

"""
LiGRUCell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function LiGRUCell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -53,10 +53,10 @@ end
Flux.@layer :expand LiGRU

"""
LiGRU((in, out)::Pair; init = glorot_uniform, bias = true)
LiGRU((in, out)::Pair; kwargs...)
"""
function LiGRU((in, out)::Pair; init = glorot_uniform, bias = true)
cell = LiGRUCell(in => out; init, bias)
function LiGRU((in, out)::Pair; kwargs...)
cell = LiGRUCell(in => out; kwargs...)
return LiGRU(cell)
end

Expand Down
12 changes: 6 additions & 6 deletions src/mgu_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Flux.@layer MGUCell

"""
MGUCell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function MGUCell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -56,10 +56,10 @@ end
Flux.@layer :expand MGU

"""
MGU((in, out)::Pair; init = glorot_uniform, bias = true)
MGU((in, out)::Pair; kwargs...)
"""
function MGU((in, out)::Pair; init = glorot_uniform, bias = true)
cell = MGUCell(in => out; init, bias)
function MGU((in, out)::Pair; kwargs...)
cell = MGUCell(in => out; kwargs...)
return MGU(cell)
end

Expand Down
18 changes: 9 additions & 9 deletions src/mut_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Flux.@layer MUT1Cell

"""
MUT1Cell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function MUT1Cell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -91,9 +91,9 @@ Flux.@layer MUT2Cell

"""
MUT2Cell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function MUT2Cell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -172,9 +172,9 @@ Flux.@layer MUT3Cell

"""
MUT3Cell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function MUT3Cell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down
12 changes: 6 additions & 6 deletions src/nas_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Flux.@layer NASCell

"""
NASCell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
"""
function NASCell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down Expand Up @@ -100,10 +100,10 @@ end
Flux.@layer :expand NAS

"""
NAS((in, out)::Pair; init = glorot_uniform, bias = true)
NAS((in, out)::Pair; kwargs...)
"""
function NAS((in, out)::Pair; init = glorot_uniform, bias = true)
cell = NASCell(in => out; init, bias)
function NAS((in, out)::Pair; kwargs...)
cell = NASCell(in => out; kwargs...)
return NAS(cell)
end

Expand Down
12 changes: 6 additions & 6 deletions src/ran_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Flux.@layer RANCell

"""
RANCell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true)
The `RANCell`, introduced in [this paper](https://arxiv.org/pdf/1705.07393),
is a recurrent cell layer which provides additional memory through the
Expand Down Expand Up @@ -99,11 +99,11 @@ end
Flux.@layer :expand RAN

"""
RAN(in => out; init = glorot_uniform, bias = true)
RAN(in => out; kwargs...)
"""
function RAN((in, out)::Pair; init = glorot_uniform, bias = true)
cell = RANCell(in => out; init, bias)
function RAN((in, out)::Pair; kwargs...)
cell = RANCell(in => out; kwargs...)
return RAN(cell)
end

Expand Down
4 changes: 2 additions & 2 deletions src/rhn_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Flux.@layer RHNCellUnit

"""
RHNCellUnit((in, out)::Pair;
kernel_init = glorot_uniform,
bias = true)
kernel_init = glorot_uniform,
bias = true)
"""
function RHNCellUnit((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down
8 changes: 4 additions & 4 deletions src/scrn_cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Flux.@layer SCRNCell

"""
function SCRNCell((in, out)::Pair;
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true,
alpha = 0.0)
kernel_init = glorot_uniform,
recurrent_kernel_init = glorot_uniform,
bias = true,
alpha = 0.0)
"""
function SCRNCell((in, out)::Pair;
kernel_init = glorot_uniform,
Expand Down

0 comments on commit 880bcdd

Please sign in to comment.