mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
Print the used factorizer when intializing training.
This commit is contained in:
@@ -68,6 +68,11 @@ namespace Eval::NNUE {
|
||||
|
||||
out << std::endl;
|
||||
|
||||
out << "Factorizers:\n"
|
||||
<< Features::Factorizer<RawFeatures>::get_factorizers_string() << std::endl;
|
||||
|
||||
out << std::endl;
|
||||
|
||||
assert(feature_transformer);
|
||||
assert(network);
|
||||
|
||||
|
||||
@@ -13,6 +13,14 @@ namespace Eval::NNUE::Features {
|
||||
template <typename FeatureType>
|
||||
class Factorizer {
|
||||
public:
|
||||
static constexpr std::string get_name() {
|
||||
return std::string("No factorizer");
|
||||
}
|
||||
|
||||
static constexpr std::string get_factorizers_string() {
|
||||
return " - " + get_name();
|
||||
}
|
||||
|
||||
// Get the dimensionality of the learning feature
|
||||
static constexpr IndexType get_dimensions() {
|
||||
return FeatureType::kDimensions;
|
||||
|
||||
@@ -21,6 +21,14 @@ namespace Eval::NNUE::Features {
|
||||
static constexpr IndexType kBaseDimensions =
|
||||
FeatureSet<FirstFeatureType, RemainingFeatureTypes...>::kDimensions;
|
||||
|
||||
static constexpr std::string get_factorizers_string() {
|
||||
std::string str = " - ";
|
||||
str += Head::get_name();
|
||||
str += '\n';
|
||||
str += Tail::get_factorizers_string();
|
||||
return str;
|
||||
}
|
||||
|
||||
// Get the dimensionality of the learning feature
|
||||
static constexpr IndexType get_dimensions() {
|
||||
return Head::get_dimensions() + Tail::get_dimensions();
|
||||
@@ -73,6 +81,14 @@ namespace Eval::NNUE::Features {
|
||||
// number of dimensions of original input features
|
||||
static constexpr IndexType kBaseDimensions = FeatureType::kDimensions;
|
||||
|
||||
static constexpr std::string get_name() {
|
||||
return FeatureType::kName;
|
||||
}
|
||||
|
||||
static constexpr std::string get_factorizers_string() {
|
||||
return " - " + get_name();
|
||||
}
|
||||
|
||||
// Get the dimensionality of the learning feature
|
||||
static constexpr IndexType get_dimensions() {
|
||||
return Factorizer<FeatureType>::get_dimensions();
|
||||
|
||||
@@ -45,6 +45,14 @@ namespace Eval::NNUE::Features {
|
||||
static_assert(get_array_length(kProperties) == kNumTrainingFeatureTypes, "");
|
||||
|
||||
public:
|
||||
static constexpr std::string get_name() {
|
||||
return std::string("Factorizer<") + FeatureType::kName + ">";
|
||||
}
|
||||
|
||||
static constexpr std::string get_factorizers_string() {
|
||||
return " - " + get_name();
|
||||
}
|
||||
|
||||
// Get the dimensionality of the learning feature
|
||||
static constexpr IndexType get_dimensions() {
|
||||
return get_active_dimensions(kProperties);
|
||||
|
||||
Reference in New Issue
Block a user