From 9a0dee6f0d70e3f6a30b9316e81839ad1024583a Mon Sep 17 00:00:00 2001 From: Markus Hauru Date: Fri, 10 Jan 2025 17:12:41 +0000 Subject: [PATCH] Remove unnecessary type parameters Co-authored-by: Penelope Yong --- src/mcmc/sghmc.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mcmc/sghmc.jl b/src/mcmc/sghmc.jl index 20d7bc148..7cf5cd6e4 100644 --- a/src/mcmc/sghmc.jl +++ b/src/mcmc/sghmc.jl @@ -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}} @@ -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