morapi_DnnRecipe Struct Reference
Recipe for dnn tuning.
More...
#include <morapi_softneuro.h>
Public Member Functions
morapi_DnnRecipe * | morapi_create_DnnRecipe (morapi_Env *io_env) |
morapi_Result | morapi_destroy_DnnRecipe (morapi_Env *io_env, morapi_DnnRecipe *self) |
morapi_Result | morapi_DnnRecipe_init (morapi_DnnRecipe *self, const morapi_DnnPlan *i_plan) |
const morapi_Params * | morapi_DnnRecipe_getParams (const morapi_DnnRecipe *self) |
morapi_Result | morapi_DnnRecipe_strip (morapi_DnnRecipe *self) |
morapi_Bool | morapi_DnnRecipe_isStripped (const morapi_DnnRecipe *self) |
morapi_Result | morapi_DnnRecipe_save (const morapi_DnnRecipe *self, const morapi_Char *i_filename) |
morapi_Result | morapi_DnnRecipe_load (morapi_DnnRecipe *self, const morapi_Char *i_filename, const void *i_password, morapi_Int32 i_password_size) |
morapi_Result | morapi_DnnRecipe_setBinaryLibEmbedded (morapi_DnnRecipe *self, morapi_Bool i_is_embedded) |
morapi_Bool | morapi_DnnRecipe_isBinaryLibEmbedded (const morapi_DnnRecipe *self) |
Detailed Description
Recipe for dnn tuning.
Member Function Documentation
morapi_create_DnnRecipe()
morapi_DnnRecipe * morapi_create_DnnRecipe (morapi_Env * io_env)
Creates a recipe.
morapi_destroy_DnnRecipe()
morapi_Result morapi_destroy_DnnRecipe (morapi_Env * io_env,
morapi_DnnRecipe * self)
Destroys the recipe.
morapi_DnnRecipe_init()
morapi_Result morapi_DnnRecipe_init (morapi_DnnRecipe * self,
const morapi_DnnPlan * i_plan)
Initializes the tuning recipe from the plan i_plan.
Parameters
- self : the DnnRecipe object
- i_plan : a object composing the recipe
morapi_DnnRecipe_getParams()
const morapi_Params * morapi_DnnRecipe_getParams (const morapi_DnnRecipe * self)
Gets the tuning parameters.
Parameters
- self : the recipe object
Returns
the tuning parameters
morapi_DnnRecipe_strip()
morapi_Result morapi_DnnRecipe_strip (morapi_DnnRecipe * self)
Strips the dnn recipe.
The stripped recipe is only available for tuning on a target device. After calling this, save the stripped recipe as a file by morapi_DnnRecipe_save().
Parameters
- self : the recipe object
morapi_DnnRecipe_isStripped()
morapi_Bool morapi_DnnRecipe_isStripped (const morapi_DnnRecipe * self)
Returns whether self is stripped or not.
Parameters
- self : the recipe object
Returns
whether self is stripped or not
morapi_DnnRecipe_save()
morapi_Result morapi_DnnRecipe_save (const morapi_DnnRecipe * self,
const morapi_Char * i_filename)
Writes the recipe to a file.
Execute this function after morapi_DnnRecipe_strip().
Parameters
- self : the recipe object
- i_filename : filen name for the resulted recipe file
morapi_DnnRecipe_load()
morapi_Result morapi_DnnRecipe_load (morapi_DnnRecipe * self,
const morapi_Char * i_filename,
const void * i_password,
morapi_Int32 i_password_size)
Reads the dnn recipe from a file.
Parameters
- self : the recipe object
- i_filename : the file name of the recipe
- i_password : the password for the encrypted file
- i_password_size : the length of the i_password string
morapi_DnnRecipe_setBinaryLibEmbedded()
morapi_Result morapi_DnnRecipe_setBinaryLibEmbedded (morapi_DnnRecipe * self,
morapi_Bool i_is_embedded)
Sets whether the binary lib is embedded when serialization.
Parameters
- self : the recipe object.
- i_is_embedded : whether the binary lib is embedded or not.
morapi_DnnRecipe_isBinaryLibEmbedded()
morapi_Bool morapi_DnnRecipe_isBinaryLibEmbedded (const morapi_DnnRecipe * self)
Checks whether the binary lib is embedded when serialization.