forked from nudt_dsp/netrans
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
/****************************************************************************
|
|
* Generated by NETRANS #NETRANS_VERSION#
|
|
* Match ovxlib #OVXLIB_VERSION#
|
|
*
|
|
* Neural Network appliction network definition source file
|
|
****************************************************************************/
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "vsi_nn_pub.h"
|
|
#include "vnn_global.h"
|
|
#include "vnn_#NETWORK_NAME_LOWER#.h"
|
|
|
|
#define NEW_NORM(_attr, url) do {\
|
|
_attr.attr.vtl = FALSE;\
|
|
_attr.attr.is_const = FALSE;\
|
|
if(VNN_APP_DEBUG) {\
|
|
_attr.name = url;\
|
|
}\
|
|
} while(0);
|
|
|
|
#define NEW_CONST(_attr, url, _ofst, _size) do {\
|
|
_attr.attr.vtl = FALSE;\
|
|
_attr.attr.is_const = TRUE;\
|
|
_attr.sz = _size;\
|
|
_attr.ofst = _ofst;\
|
|
if(VNN_APP_DEBUG) {\
|
|
_attr.name = url;\
|
|
}\
|
|
} while(0);
|
|
|
|
#define NEW_VIRTUAL(_attr, url) do {\
|
|
_attr.attr.vtl = TRUE;\
|
|
_attr.attr.is_const = FALSE;\
|
|
if(VNN_APP_DEBUG) {\
|
|
_attr.name = url;\
|
|
}\
|
|
} while(0);
|
|
|
|
const vnn_attr_t *vnn_Create#NETWORK_NAME#Attr()
|
|
{
|
|
static vnn_attr_t attr[#NETWORK_NAME_UPPER#_TOTAL_TENSOR_NUM];
|
|
|
|
#NET_PCQ_ZP_SCALES#
|
|
|
|
#ATTR_INITIALIZER#
|
|
|
|
return attr;
|
|
} |