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:
parent
b521e405d3
commit
d6e8089f50
3 changed files with 8 additions and 2 deletions
|
@ -23,7 +23,10 @@ AlignedPtr<FeatureTransformer> feature_transformer;
|
||||||
AlignedPtr<Network> network;
|
AlignedPtr<Network> network;
|
||||||
|
|
||||||
// Evaluation function file name
|
// 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
|
// Get a string that represents the structure of the evaluation function
|
||||||
std::string GetArchitectureString() {
|
std::string GetArchitectureString() {
|
||||||
|
|
|
@ -38,6 +38,9 @@ extern AlignedPtr<Network> network;
|
||||||
// Evaluation function file name
|
// Evaluation function file name
|
||||||
extern std::string fileName;
|
extern std::string fileName;
|
||||||
|
|
||||||
|
// Saved evaluation function file name
|
||||||
|
extern std::string savedfileName;
|
||||||
|
|
||||||
// Get a string that represents the structure of the evaluation function
|
// Get a string that represents the structure of the evaluation function
|
||||||
std::string GetArchitectureString();
|
std::string GetArchitectureString();
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ void save_eval(std::string dir_name) {
|
||||||
NNUE::SendMessages({{"clear_unobserved_feature_weights"}});
|
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);
|
std::ofstream stream(file_name, std::ios::binary);
|
||||||
const bool result = NNUE::WriteParameters(stream);
|
const bool result = NNUE::WriteParameters(stream);
|
||||||
assert(result);
|
assert(result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue