Skip to content

Commit

Permalink
Remove unnecessary type parameters
Browse files Browse the repository at this point in the history
Co-authored-by: Penelope Yong <[email protected]>
  • Loading branch information
mhauru and penelopeysm authored Jan 10, 2025
1 parent 091d114 commit 9a0dee6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mcmc/sghmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ function SGHMC(;
adtype::ADTypes.AbstractADType=Turing.DEFAULT_ADTYPE,
)
_learning_rate, _momentum_decay = promote(learning_rate, momentum_decay)
return SGHMC{typeof(adtype),typeof(_learning_rate)}(
_learning_rate, _momentum_decay, adtype
)
return SGHMC(_learning_rate, _momentum_decay, adtype)
end

struct SGHMCState{L,V<:AbstractVarInfo,T<:AbstractVector{<:Real}}
Expand Down Expand Up @@ -185,7 +183,7 @@ See also: [`PolynomialStepsize`](@ref)
function SGLD(;
stepsize=PolynomialStepsize(0.01), adtype::ADTypes.AbstractADType=Turing.DEFAULT_ADTYPE
)
return SGLD{typeof(adtype),typeof(stepsize)}(stepsize, adtype)
return SGLD(stepsize, adtype)
end

struct SGLDTransition{T,F<:Real} <: AbstractTransition
Expand Down

0 comments on commit 9a0dee6

Please sign in to comment.