From 8943dd7347e6cc25977ffcc7ae0e0e6e54ab1ce9 Mon Sep 17 00:00:00 2001 From: HuaiMing Date: Thu, 1 Sep 2022 10:26:09 +0800 Subject: [PATCH 1/3] try to fix deps --- Project.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 1aad05b..12c765b 100644 --- a/Project.toml +++ b/Project.toml @@ -26,11 +26,11 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] BoundaryValueDiffEq = "2" -Convex = "0.14, 0.15" +Convex = "0.15" Distributions = "0.25" -Flux = "0.12, 0.14" -Interpolations = "0.13, 0.15" -IntervalSets = "0.5, 0.7" +Flux = "0.12, 0.13" +Interpolations = "0.13" +IntervalSets = "0.5" QuadGK = "2" ReinforcementLearning = "0.10" SCS = "1" From 3f17c8722c85ee1daabbd45be2f23e9c52b75fc4 Mon Sep 17 00:00:00 2001 From: HuaiMing Date: Thu, 1 Sep 2022 15:36:41 +0800 Subject: [PATCH 2/3] fix params not defined issues --- src/Algorithm/DDPG.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Algorithm/DDPG.jl b/src/Algorithm/DDPG.jl index 5f353f2..f926545 100644 --- a/src/Algorithm/DDPG.jl +++ b/src/Algorithm/DDPG.jl @@ -1,9 +1,11 @@ ## TODO: Need reconstruct !!! using Flux: glorot_normal, glorot_uniform using StableRNGs -using Flux.Losses using IntervalSets +Base.copyto!(dest::ReinforcementLearning.NeuralNetworkApproximator, src::ReinforcementLearning.NeuralNetworkApproximator) = + Flux.loadparams!(dest.model, Flux.params(src)) + function Base.rsplit( v, l::Int) u = reshape(v,l,length(v)÷l) [u[:,i] for i=1:size(u,2)] From b00f29aa3c2a54ac55b07ba2e91b99ee64a8feb3 Mon Sep 17 00:00:00 2001 From: HuaiMing Date: Thu, 1 Sep 2022 15:36:58 +0800 Subject: [PATCH 3/3] fix params not defined issues --- src/Algorithm/DDPG.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Algorithm/DDPG.jl b/src/Algorithm/DDPG.jl index 5f353f2..f926545 100644 --- a/src/Algorithm/DDPG.jl +++ b/src/Algorithm/DDPG.jl @@ -1,9 +1,11 @@ ## TODO: Need reconstruct !!! using Flux: glorot_normal, glorot_uniform using StableRNGs -using Flux.Losses using IntervalSets +Base.copyto!(dest::ReinforcementLearning.NeuralNetworkApproximator, src::ReinforcementLearning.NeuralNetworkApproximator) = + Flux.loadparams!(dest.model, Flux.params(src)) + function Base.rsplit( v, l::Int) u = reshape(v,l,length(v)÷l) [u[:,i] for i=1:size(u,2)]