mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 06:17:49 +00:00
Post merge fixes
This commit is contained in:
+19
-19
@@ -127,28 +127,28 @@ namespace Eval {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NNUE::export_net(const std::optional<std::string>& filename) {
|
void export_net(const std::optional<std::string>& filename) {
|
||||||
std::string actualFilename;
|
std::string actualFilename;
|
||||||
if (filename.has_value()) {
|
if (filename.has_value()) {
|
||||||
actualFilename = filename.value();
|
actualFilename = filename.value();
|
||||||
} else {
|
} else {
|
||||||
if (eval_file_loaded != EvalFileDefaultName) {
|
if (eval_file_loaded != EvalFileDefaultName) {
|
||||||
sync_cout << "Failed to export a net. A non-embedded net can only be saved if the filename is specified." << sync_endl;
|
sync_cout << "Failed to export a net. A non-embedded net can only be saved if the filename is specified." << sync_endl;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
actualFilename = EvalFileDefaultName;
|
||||||
|
}
|
||||||
|
|
||||||
|
ofstream stream(actualFilename, std::ios_base::binary);
|
||||||
|
if (save_eval(stream)) {
|
||||||
|
sync_cout << "Network saved successfully to " << actualFilename << "." << sync_endl;
|
||||||
|
} else {
|
||||||
|
sync_cout << "Failed to export a net." << sync_endl;
|
||||||
}
|
}
|
||||||
actualFilename = EvalFileDefaultName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ofstream stream(actualFilename, std::ios_base::binary);
|
/// NNUE::verify() verifies that the last net used was loaded successfully
|
||||||
if (save_eval(stream)) {
|
void verify() {
|
||||||
sync_cout << "Network saved successfully to " << actualFilename << "." << sync_endl;
|
|
||||||
} else {
|
|
||||||
sync_cout << "Failed to export a net." << sync_endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// NNUE::verify() verifies that the last net used was loaded successfully
|
|
||||||
void NNUE::verify() {
|
|
||||||
|
|
||||||
string eval_file = string(Options["EvalFile"]);
|
string eval_file = string(Options["EvalFile"]);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#ifndef NNUE_COMMON_H_INCLUDED
|
#ifndef NNUE_COMMON_H_INCLUDED
|
||||||
#define NNUE_COMMON_H_INCLUDED
|
#define NNUE_COMMON_H_INCLUDED
|
||||||
|
|
||||||
#include "types.h"
|
#include "../types.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "nnue_architecture.h"
|
#include "nnue_architecture.h"
|
||||||
|
|
||||||
#include "../misc.h"
|
#include "../misc.h"
|
||||||
|
#include "../position.h"
|
||||||
|
|
||||||
#include <cstring> // std::memset()
|
#include <cstring> // std::memset()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user