|
io-chess
UCI chess engine
|
#include <Writers.hpp>
Public Member Functions | |
| ExpertWeightsWriter (const std::string &fname, size_t batch_capacity=1000) | |
| ~ExpertWeightsWriter () | |
| void | add (const ExpertRouter::ExpertWeights &weights) |
| void | add (const float *weights) |
| void | flush () |
Private Attributes | |
| std::string | filename |
| std::vector< float > | buffer |
| size_t | batch_size |
Static Private Attributes | |
| static constexpr int | NUM_EXPERTS = ExpertRouter::NUM_EXPERTS |
ExpertWeightsWriter - Writes expert routing weights during preprocessing
Output format: 6 x float32 per position (NUM_EXPERTS weights) Total: 24 bytes per position
| ExpertWeightsWriter::ExpertWeightsWriter | ( | const std::string & | fname, |
| size_t | batch_capacity = 1000 ) |
| ExpertWeightsWriter::~ExpertWeightsWriter | ( | ) |

| void ExpertWeightsWriter::add | ( | const ExpertRouter::ExpertWeights & | weights | ) |
Add weights for one position
| weights | The ExpertWeights struct from ExpertRouter |


| void ExpertWeightsWriter::add | ( | const float * | weights | ) |
Add weights from raw array
| weights | Array of NUM_EXPERTS floats |

| void ExpertWeightsWriter::flush | ( | ) |

|
private |
|
private |
|
private |
|
staticconstexprprivate |