NMSIS-NN  Version 1.3.1
NMSIS NN Software Library
para_gen Namespace Reference

Functions

def convert_to_x4_weights (weights)
 
def convert_q7_q15_weights (weights)
 

Variables

int vec_dim = 64
 
int row_dim = 32
 
 update_weight = np.zeros((row_dim,vec_dim), dtype=int)
 
 reset_weight = np.zeros((row_dim,vec_dim), dtype=int)
 
 hidden_weight = np.zeros((row_dim,vec_dim), dtype=int)
 
 update_bias = np.zeros((row_dim), dtype=int)
 
 reset_bias = np.zeros((row_dim), dtype=int)
 
 hidden_bias = np.zeros((row_dim), dtype=int)
 
 input_data1 = np.zeros((vec_dim-row_dim), dtype=int)
 
 input_data2 = np.zeros((vec_dim-row_dim), dtype=int)
 
 history_data = np.zeros((row_dim), dtype=int)
 
 outfile = open("riscv_nnexamples_gru_test_data.h", "w")
 
 weight = np.reshape(update_weight, (row_dim, vec_dim, 1, 1))
 
def new_weight = convert_to_x4_weights(weight)
 
 sep
 
 format
 

Function Documentation

◆ convert_q7_q15_weights()

def para_gen.convert_q7_q15_weights (   weights)

◆ convert_to_x4_weights()

def para_gen.convert_to_x4_weights (   weights)

Variable Documentation

◆ format

para_gen.format

◆ hidden_bias

para_gen.hidden_bias = np.zeros((row_dim), dtype=int)

◆ hidden_weight

para_gen.hidden_weight = np.zeros((row_dim,vec_dim), dtype=int)

◆ history_data

para_gen.history_data = np.zeros((row_dim), dtype=int)

◆ input_data1

para_gen.input_data1 = np.zeros((vec_dim-row_dim), dtype=int)

◆ input_data2

para_gen.input_data2 = np.zeros((vec_dim-row_dim), dtype=int)

◆ new_weight

def para_gen.new_weight = convert_to_x4_weights(weight)

◆ outfile

para_gen.outfile = open("riscv_nnexamples_gru_test_data.h", "w")

◆ reset_bias

para_gen.reset_bias = np.zeros((row_dim), dtype=int)

◆ reset_weight

para_gen.reset_weight = np.zeros((row_dim,vec_dim), dtype=int)

◆ row_dim

int para_gen.row_dim = 32

◆ sep

para_gen.sep

◆ update_bias

para_gen.update_bias = np.zeros((row_dim), dtype=int)

◆ update_weight

para_gen.update_weight = np.zeros((row_dim,vec_dim), dtype=int)

◆ vec_dim

int para_gen.vec_dim = 64

◆ weight

para_gen.weight = np.reshape(update_weight, (row_dim, vec_dim, 1, 1))