We need to define serialize() and deserialize() for our feature extractor if we want to be able to serialize and deserialize our learned models. In this case the implementation is empty since our feature_extractor doesn't have any state. But you might define more complex feature extractors which have state that needs to be saved.
| 146 | // implementation is empty since our feature_extractor doesn't have any state. But you |
| 147 | // might define more complex feature extractors which have state that needs to be saved. |
| 148 | void serialize (const feature_extractor& , std::ostream& ) {} |
| 149 | void deserialize (feature_extractor& , std::istream& ) {} |
| 150 | |
| 151 | // ---------------------------------------------------------------------------------------- |