mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
UCI option EvalFile
Replace EvalDir with EvalFile Can now browse filesystem for net (eval\nn.bin is default) nn.bin no longer hard-coded
This commit is contained in:
@@ -23,7 +23,7 @@ AlignedPtr<FeatureTransformer> feature_transformer;
|
||||
AlignedPtr<Network> network;
|
||||
|
||||
// Evaluation function file name
|
||||
const char* const kFileName = "nn.bin";
|
||||
const char* kFileName = "eval\\nn.bin";
|
||||
|
||||
// Get a string that represents the structure of the evaluation function
|
||||
std::string GetArchitectureString() {
|
||||
@@ -243,8 +243,8 @@ void load_eval() {
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string dir_name = Options["EvalDir"];
|
||||
const std::string file_name = Path::Combine(dir_name, NNUE::kFileName);
|
||||
const std::string file_name = Options["EvalFile"];
|
||||
NNUE::kFileName = file_name.c_str();
|
||||
|
||||
std::ifstream stream(file_name, std::ios::binary);
|
||||
const bool result = NNUE::ReadParameters(stream);
|
||||
|
||||
@@ -36,7 +36,7 @@ extern AlignedPtr<FeatureTransformer> feature_transformer;
|
||||
extern AlignedPtr<Network> network;
|
||||
|
||||
// Evaluation function file name
|
||||
extern const char* const kFileName;
|
||||
extern const char* kFileName;
|
||||
|
||||
// Get a string that represents the structure of the evaluation function
|
||||
std::string GetArchitectureString();
|
||||
|
||||
Reference in New Issue
Block a user