1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Saving new network in correct path.

This commit is contained in:
zz4032 2020-07-11 10:33:36 +02:00 committed by nodchip
parent b521e405d3
commit d6e8089f50
3 changed files with 8 additions and 2 deletions

View file

@ -23,7 +23,10 @@ AlignedPtr<FeatureTransformer> feature_transformer;
AlignedPtr<Network> network;
// Evaluation function file name
std::string fileName = "eval\\nn.bin";
std::string fileName = "nn.bin";
// Saved evaluation function file name
std::string savedfileName = "nn.bin";
// Get a string that represents the structure of the evaluation function
std::string GetArchitectureString() {

View file

@ -38,6 +38,9 @@ extern AlignedPtr<Network> network;
// Evaluation function file name
extern std::string fileName;
// Saved evaluation function file name
extern std::string savedfileName;
// Get a string that represents the structure of the evaluation function
std::string GetArchitectureString();

View file

@ -213,7 +213,7 @@ void save_eval(std::string dir_name) {
NNUE::SendMessages({{"clear_unobserved_feature_weights"}});
}
const std::string file_name = NNUE::fileName;
const std::string file_name = Path::Combine(eval_dir, NNUE::savedfileName);
std::ofstream stream(file_name, std::ios::binary);
const bool result = NNUE::WriteParameters(stream);
assert(result);