Upload folder using huggingface_hub
Browse files
neural_engine/src/main.rs
CHANGED
|
@@ -81,7 +81,7 @@ fn evaluate_onnx(
|
|
| 81 |
let logits = &policy_data[start_idx..end_idx];
|
| 82 |
|
| 83 |
// Softmax over policy logits with Temperature
|
| 84 |
-
let temp =
|
| 85 |
let max_logit = logits.iter().cloned().fold(f32::NEG_INFINITY, f32::max) / temp;
|
| 86 |
let mut exps = Vec::with_capacity(logits.len());
|
| 87 |
let mut sum_exp = 0.0;
|
|
@@ -160,7 +160,7 @@ fn mcts_simulate(
|
|
| 160 |
let mut best_action = String::new();
|
| 161 |
|
| 162 |
let total_sqrt = (node.visit_count as f32).sqrt();
|
| 163 |
-
let c_puct = 2.
|
| 164 |
for (action, child) in &node.children {
|
| 165 |
let q = if child.visit_count > 0 {
|
| 166 |
child.value_sum / (child.visit_count as f32)
|
|
|
|
| 81 |
let logits = &policy_data[start_idx..end_idx];
|
| 82 |
|
| 83 |
// Softmax over policy logits with Temperature
|
| 84 |
+
let temp = 1.0;
|
| 85 |
let max_logit = logits.iter().cloned().fold(f32::NEG_INFINITY, f32::max) / temp;
|
| 86 |
let mut exps = Vec::with_capacity(logits.len());
|
| 87 |
let mut sum_exp = 0.0;
|
|
|
|
| 160 |
let mut best_action = String::new();
|
| 161 |
|
| 162 |
let total_sqrt = (node.visit_count as f32).sqrt();
|
| 163 |
+
let c_puct = 2.5;
|
| 164 |
for (action, child) in &node.children {
|
| 165 |
let q = if child.visit_count > 0 {
|
| 166 |
child.value_sum / (child.visit_count as f32)
|