Commit 63e53966 authored by szymon's avatar szymon
Browse files

Fix: adding missed running statistics count in serialization. This inpacted...

Fix: adding missed running statistics count in serialization. This inpacted resuming. JSON can be easily migrated by adding number of steps ac count.
parent e5574939
......@@ -61,10 +61,13 @@ public:
void serialize(nlohmann::json& json) override {
json["var"] = std::move(std::vector<float>(var.data(), var.data() + var.rows() * var.cols()));
json["mean"] = std::move(std::vector<float>(mean.data(), mean.data() + mean.rows() * mean.cols()));
json["count"] = count;
}
void deserialize(nlohmann::json& json) override {
count = json["count"].get<double>();
auto var_v {json["var"].get<std::vector<float>>()};
auto mean_v {json["mean"].get<std::vector<float>>()};
//
......
{"action_space":"continous","cliprange":0.16102319955825806,"cliprange_vf":-1.0,"ent_coef":0.0007160293171182275,"gamma":0.9900000095367432,"lam":0.949999988079071,"learning_rate":0.000393141177482903,"max_grad_norm":0.5,"model_filename":"exp/ppo_cpp/resources/ppo_cl/graphs/ppo_cpp_[4_5]_lr_0.0004_cr_0.1610_ent_0.0007.meta.txt","n_envs":1,"n_steps":65536,"nminibatches":32,"noptepochs":10,"obs_rms":{"mean":[0.11388769745826721,-0.10644910484552383,0.13249729573726654,-0.12047628313302994,-0.031939830631017685,0.19972757995128632,0.010289933532476425,-0.03970659524202347,-0.23368102312088013,-0.0914468765258789,-0.08592124283313751,-0.06392403692007065,0.10127884149551392,-0.1429499089717865,0.016221938654780388,0.08366461098194122,-0.2147410362958908,0.0954587310552597],"var":[0.058078039437532425,0.05662751942873001,0.057350631803274155,0.057584427297115326,0.03590843081474304,0.0477270744740963,0.035220347344875336,0.05815790593624115,0.058200497180223465,0.059810664504766464,0.029463358223438263,0.045935820788145065,0.05793340876698494,0.023293279111385345,0.0403718426823616,0.05831030756235123,0.040630389004945755,0.05716487392783165]},"observation_space":"continous","ret_rms":{"mean":[0.687118411064148],"var":[0.15154403448104858]},"vf_coef":0.5,"reset_noise_scale": 0.1}
\ No newline at end of file
{
"action_space": "continous",
"cliprange": 0.16102319955825806,
"cliprange_vf": -1.0,
"ent_coef": 0.0007160293171182275,
"gamma": 0.9900000095367432,
"lam": 0.949999988079071,
"learning_rate": 0.000393141177482903,
"max_grad_norm": 0.5,
"model_filename": "exp/ppo_cpp/resources/ppo_cl/graphs/ppo_cpp_[4_5]_lr_0.0004_cr_0.1610_ent_0.0007.meta.txt",
"n_envs": 1,
"n_steps": 65536,
"nminibatches": 32,
"noptepochs": 10,
"obs_rms": {
"count": 72001473.000001,
"mean": [
0.11388769745826721,
-0.10644910484552383,
0.13249729573726654,
-0.12047628313302994,
-0.031939830631017685,
0.19972757995128632,
0.010289933532476425,
-0.03970659524202347,
-0.23368102312088013,
-0.0914468765258789,
-0.08592124283313751,
-0.06392403692007065,
0.10127884149551392,
-0.1429499089717865,
0.016221938654780388,
0.08366461098194122,
-0.2147410362958908,
0.0954587310552597
],
"var": [
0.058078039437532425,
0.05662751942873001,
0.057350631803274155,
0.057584427297115326,
0.03590843081474304,
0.0477270744740963,
0.035220347344875336,
0.05815790593624115,
0.058200497180223465,
0.059810664504766464,
0.029463358223438263,
0.045935820788145065,
0.05793340876698494,
0.023293279111385345,
0.0403718426823616,
0.05831030756235123,
0.040630389004945755,
0.05716487392783165
]
},
"observation_space": "continous",
"ret_rms": {
"count": 72001473.000001,
"mean": [
0.687118411064148
],
"var": [
0.15154403448104858
]
},
"vf_coef": 0.5,
"reset_noise_scale": 0.1
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment