int sod_realnet_train_config(sod_realnet_trainer *pTrainer, SOD_REALNET_TRAINER_CONFIG op, ...);
Configure a sod_realnet_trainer handle. The second argument to sod_realnet_train_config() is an integer configuration option that determines what property of the RealNet trainer is to be configured. Subsequent arguments vary depending on the configuration option in the second argument. The most important configuration options are the log consumer callback and the model output path that you need to set manually here.
A pointer to a valid sod_realnet_trainer object obtained from a prior successful call to sod_realnet_train_init().
An integer configuration option that determines what property of the sod_realnet_trainer is to be configured. Subsequent arguments vary depending on the configuration verb. Here is a list of the allowed configuration options:
|Configuration Verb||Expected Arguments||Description|
|Register a log consumer callback:
void (*xLog)(const char *zMsg, size_t msgLen, void *pUserData)A pointer to a user defined function responsible of consuming all training output messages.
The first argument is a pointer to a null terminated string generated by the RealNet trainer that your callback have to consume (i.e. redirecting to STDOUT or some disk file for example). The second argument is the string length and the third argument is an arbitrary pointer passed verbatim by the RealNet trainer to your callback that you have to pass as second argument to this configuration option. If you do not want to share data with the callback, simply pass NULL.
const char *zPath
|Path where to store the output RealNet model
SOD_OK is returned on success. Any other code indicates failure.
Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.
sod_realnet_train_init • sod_realnet_train_start • sod_realnet_train_release.