17#ifndef _ONERT_MICRO_H_
18#define _ONERT_MICRO_H_
109#define NNFW_MAX_RANK (6)
179#define NNFW_TRAINABLE_OPS_MAX_SIZE (256)
353 void *buffer,
size_t length);
volatile const char info[]
#define NNFW_MAX_RANK
Maximum rank expressible with nnfw.
NNFW_TRAIN_LOSS_REDUCTION
@ NNFW_TRAIN_LOSS_REDUCTION_SUM_OVER_BATCH_SIZE
@ NNFW_TRAIN_OPTIMIZER_ADAM
@ NNFW_TRAIN_LOSS_CATEGORICAL_CROSSENTROPY
NNFW_STATUS nnfw_create_session(nnfw_session **session)
Create a new session instance.
NNFW_STATUS
Result values returned from a call to an API function.
@ NNFW_STATUS_INVALID_STATE
@ NNFW_STATUS_UNEXPECTED_NULL
@ NNFW_STATUS_DEPRECATED_API
@ NNFW_STATUS_INSUFFICIENT_OUTPUT_SIZE
@ NNFW_STATUS_OUT_OF_MEMORY
NNFW_STATUS nnfw_close_session(nnfw_session *session)
Close a session instance.
NNFW_STATUS nnfw_train_get_loss(nnfw_session *session, uint32_t index, float *loss)
Get loss value for expected output.
NNFW_STATUS nnfw_train_export_checkpoint(nnfw_session *session, const char *path)
NNFW_TRAIN_LOSS_REDUCTION
@ NNFW_TRAIN_LOSS_REDUCTION_UNDEFINED
@ NNFW_TRAIN_LOSS_REDUCTION_SUM
@ NNFW_TRAIN_LOSS_REDUCTION_SUM_OVER_BATCH_SIZE
struct nnfw_train_info nnfw_train_info
Training information to prepare training.
@ NNFW_TRAIN_OPTIMIZER_ADAM
@ NNFW_TRAIN_OPTIMIZER_SGD
@ NNFW_TRAIN_OPTIMIZER_UNDEFINED
NNFW_STATUS nnfw_load_model_from_file(nnfw_session *session, const char *package_file_path)
Load model from nnpackage file or directory.
NNFW_STATUS nnfw_train_prepare(nnfw_session *session)
Prepare session to be ready for training.
NNFW_STATUS nnfw_train(nnfw_session *session, bool update_weights)
Train the model.
NNFW_STATUS nnfw_train_set_traininfo(nnfw_session *session, const nnfw_train_info *info)
Set training information.
NNFW_STATUS nnfw_train_set_input(nnfw_session *session, uint32_t index, void *input, const nnfw_tensorinfo *input_info)
Set training input.
struct nnfw_loss_info nnfw_loss_info
struct nnfw_tensorinfo nnfw_tensorinfo
tensor info describes the type and shape of tensors
NNFW_STATUS nnfw_train_set_output(nnfw_session *session, uint32_t index, NNFW_TYPE type, void *buffer, size_t length)
Set training output buffer.
NNFW_STATUS nnfw_train_import_checkpoint(nnfw_session *session, const char *path)
NNFW_STATUS nnfw_train_set_expected(nnfw_session *session, uint32_t index, void *expected, const nnfw_tensorinfo *expected_info)
Set training expected output.
@ NNFW_TRAIN_LOSS_MEAN_SQUARED_ERROR
@ NNFW_TRAIN_LOSS_UNDEFINED
@ NNFW_TRAIN_LOSS_CATEGORICAL_CROSSENTROPY
@ NNFW_TYPE_TENSOR_FLOAT32
NNFW_STATUS nnfw_train_export_circle(nnfw_session *session, const char *path)
Export current training model into circle model.
NNFW_TRAIN_LOSS_REDUCTION reduction_type
tensor info describes the type and shape of tensors
int32_t dims[NNFW_MAX_RANK]
Training information to prepare training.
uint32_t num_trainble_ops
nnfw_adam_option adam_opt