We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f61f9f commit 5912381Copy full SHA for 5912381
src/graph/htps.cpp
@@ -809,7 +809,15 @@ HTPSNode HTPSNode::from_json(const nlohmann::json &j) {
809
node.policy = j["policy"];
810
node.exploration = j["exploration"];
811
node.tactic_init_value = j["tactic_init_value"];
812
- node.log_w = static_cast<std::vector<double>>(j["log_w"]);
+ std::vector<double> log_w;
813
+ for (const auto &w: j["log_w"]) {
814
+ if (w.is_null()) {
815
+ log_w.push_back(MIN_FLOAT);
816
+ } else {
817
+ log_w.push_back(w);
818
+ }
819
820
+ node.log_w = log_w;
821
node.counts = static_cast<std::vector<size_t>>(j["counts"]);
822
node.virtual_counts = static_cast<std::vector<size_t>>(j["virtual_counts"]);
823
node.reset_mask = static_cast<std::vector<bool>>(j["reset_mask"]);
0 commit comments