47struct kiss_train_priv;
58 struct kiss_train_priv *priv;
bool kiss_create_training_session_prealloc(struct kiss_training_session *session, const char *path, int batch_size)
Loads a training session archive from disk while using a session allocated by the caller.
bool kiss_start_training(struct kiss_training_session *session, kiss_loss_t loss, kiss_data_feed_cb_t datafeeder, kiss_data_free_cb_t datafreeer, kiss_train_progress_cb_t progresscb, void *user_ptr)
Starts training the network.
struct kiss_training_session * kiss_create_training_session(const char *path, int batch_size)
Loads a training session archive from disk.
kiss_train_state_t
Definition train.h:41
const char * kiss_state_to_str(kiss_train_state_t state)
Gets a description string descrebing the state.
void(* kiss_data_free_cb_t)(struct kiss_training_data *data, void *usr_ptr)
A function pointer of this type is used by libkissinference to free data requested by the user of thi...
Definition train.h:83
const char * kiss_train_get_strerror(struct kiss_training_session *session)
Gets a error description string descrebing the lass orccured error.
void kiss_finish_training(struct kiss_training_session *session)
Finalizes training of the network.
void kiss_free_training_session_prealloc(struct kiss_training_session *session)
Frees the resources associated with a kiss_training_session but not the struct itself.
void kiss_free_training_session(struct kiss_training_session *session)
Frees a kiss_training_session.
void(* kiss_train_progress_cb_t)(struct kiss_training_session *session, kiss_train_state_t state, float loss, int step, void *usr_ptr)
A function pointer of this type is used by libkissinference to inform the user of this libary.
Definition train.h:91
@ KISS_STEP_COMPLETED
Emmited when a training optimizer step compleates, not emmited after the final step.
Definition train.h:42
@ KISS_COMPLETED
Emmited when a training completes the final optimizer step.
Definition train.h:43
@ KISS_ERROR_STATE
Emmited when an error is encountered.
Definition train.h:44
Struct describing a kiss neural network.
Definition kissinference.h:53
A function pointer of this type is used by libkissinference-train to request data from the user.
Definition train.h:61
size_t in_size
Length of the input array.
Definition train.h:63
float * in
Network input.
Definition train.h:62
float * out
Target output for loss computation.
Definition train.h:64
size_t out_size
Length of the target output array.
Definition train.h:65
Struct describing a training session.
Definition train.h:53
bool ready
Set to true of the session is ready to train.
Definition train.h:54
struct kiss_network * net
A network struct containing network metadata, note this struct is not complete and can not be used fo...
Definition train.h:56
void * user_ptr
Contains user pointer that is passed to the callbacks.
Definition train.h:55