Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2017-07-12 23:55:28 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2017-07-12 23:55:28 +0300
commit04d7e521d04a5d6cc439d3c7b60f51dfe74408f4 (patch)
treeea931609fb273bd546ac3edc69b78f10853dc7ce
parent439b1b5037eac0f423f92395c6314e52f26e8012 (diff)
Add RNN for VAD and speech/music classification
Based on two dense layers with a GRU layer in the middle
-rw-r--r--src/analysis.c13
-rw-r--r--src/analysis.h2
-rw-r--r--src/mlp.c168
-rw-r--r--src/mlp.h59
-rw-r--r--src/mlp_data.c510
5 files changed, 530 insertions, 222 deletions
diff --git a/src/analysis.c b/src/analysis.c
index f4160e4b..db9de051 100644
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -352,6 +352,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
float band_log2[NB_TBANDS+1];
float leakage_from[NB_TBANDS+1];
float leakage_to[NB_TBANDS+1];
+ float layer_out[MAX_NEURONS];
SAVE_STACK;
alpha = 1.f/IMIN(10, 1+tonal->count);
@@ -761,18 +762,14 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
features[23] = info->tonality_slope + 0.069216f;
features[24] = tonal->lowECount - 0.067930f;
- mlp_process(&net, features, frame_probs);
- frame_probs[0] = .5f*(frame_probs[0]+1);
- /* Curve fitting between the MLP probability and the actual probability */
- /*frame_probs[0] = .01f + 1.21f*frame_probs[0]*frame_probs[0] - .23f*(float)pow(frame_probs[0], 10);*/
- /* Probability of active audio (as opposed to silence) */
- frame_probs[1] = .5f*frame_probs[1]+.5f;
- frame_probs[1] *= frame_probs[1];
+ compute_dense(&layer0, layer_out, features);
+ compute_gru(&layer1, tonal->rnn_state, layer_out);
+ compute_dense(&layer2, frame_probs, tonal->rnn_state);
/* Probability of speech or music vs noise */
info->activity_probability = frame_probs[1];
- /*printf("%f %f\n", frame_probs[0], frame_probs[1]);*/
+ printf("%f %f\n", frame_probs[0], frame_probs[1]);
{
/* Probability of state transition */
float tau;
diff --git a/src/analysis.h b/src/analysis.h
index cac51dfa..629a32fb 100644
--- a/src/analysis.h
+++ b/src/analysis.h
@@ -30,6 +30,7 @@
#include "celt.h"
#include "opus_private.h"
+#include "mlp.h"
#define NB_FRAMES 8
#define NB_TBANDS 18
@@ -86,6 +87,7 @@ typedef struct {
int read_pos;
int read_subframe;
float hp_ener_accum;
+ float rnn_state[MAX_NEURONS];
opus_val32 downmix_state[3];
AnalysisInfo info[DETECT_SIZE];
} TonalityAnalysisState;
diff --git a/src/mlp.c b/src/mlp.c
index ff9e50df..eb404c53 100644
--- a/src/mlp.c
+++ b/src/mlp.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2008-2011 Octasic Inc.
- Written by Jean-Marc Valin */
+ 2012-1027 Jean-Marc Valin */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -29,42 +29,13 @@
#include "config.h"
#endif
+#include <math.h>
#include "opus_types.h"
#include "opus_defines.h"
-
-#include <math.h>
-#include "mlp.h"
#include "arch.h"
#include "tansig_table.h"
-#define MAX_NEURONS 100
+#include "mlp.h"
-#if 0
-static OPUS_INLINE opus_val16 tansig_approx(opus_val32 _x) /* Q19 */
-{
- int i;
- opus_val16 xx; /* Q11 */
- /*double x, y;*/
- opus_val16 dy, yy; /* Q14 */
- /*x = 1.9073e-06*_x;*/
- if (_x>=QCONST32(8,19))
- return QCONST32(1.,14);
- if (_x<=-QCONST32(8,19))
- return -QCONST32(1.,14);
- xx = EXTRACT16(SHR32(_x, 8));
- /*i = lrint(25*x);*/
- i = SHR32(ADD32(1024,MULT16_16(25, xx)),11);
- /*x -= .04*i;*/
- xx -= EXTRACT16(SHR32(MULT16_16(20972,i),8));
- /*x = xx*(1./2048);*/
- /*y = tansig_table[250+i];*/
- yy = tansig_table[250+i];
- /*y = yy*(1./16384);*/
- dy = 16384-MULT16_16_Q14(yy,yy);
- yy = yy + MULT16_16_Q14(MULT16_16_Q11(xx,dy),(16384 - MULT16_16_Q11(yy,xx)));
- return yy;
-}
-#else
-/*extern const float tansig_table[501];*/
static OPUS_INLINE float tansig_approx(float x)
{
int i;
@@ -92,54 +63,97 @@ static OPUS_INLINE float tansig_approx(float x)
y = y + x*dy*(1 - y*x);
return sign*y;
}
-#endif
-#if 0
-void mlp_process(const MLP *m, const opus_val16 *in, opus_val16 *out)
+static OPUS_INLINE float sigmoid_approx(float x)
{
- int j;
- opus_val16 hidden[MAX_NEURONS];
- const opus_val16 *W = m->weights;
- /* Copy to tmp_in */
- for (j=0;j<m->topo[1];j++)
- {
- int k;
- opus_val32 sum = SHL32(EXTEND32(*W++),8);
- for (k=0;k<m->topo[0];k++)
- sum = MAC16_16(sum, in[k],*W++);
- hidden[j] = tansig_approx(sum);
- }
- for (j=0;j<m->topo[2];j++)
- {
- int k;
- opus_val32 sum = SHL32(EXTEND32(*W++),14);
- for (k=0;k<m->topo[1];k++)
- sum = MAC16_16(sum, hidden[k], *W++);
- out[j] = tansig_approx(EXTRACT16(PSHR32(sum,17)));
- }
+ return .5 + .5*tansig_approx(.5*x);
}
-#else
-void mlp_process(const MLP *m, const float *in, float *out)
+
+void compute_dense(const DenseLayer *layer, float *output, const float *input)
{
- int j;
- float hidden[MAX_NEURONS];
- const float *W = m->weights;
- /* Copy to tmp_in */
- for (j=0;j<m->topo[1];j++)
- {
- int k;
- float sum = *W++;
- for (k=0;k<m->topo[0];k++)
- sum = sum + in[k]**W++;
- hidden[j] = tansig_approx(sum);
- }
- for (j=0;j<m->topo[2];j++)
- {
- int k;
- float sum = *W++;
- for (k=0;k<m->topo[1];k++)
- sum = sum + hidden[k]**W++;
- out[j] = tansig_approx(sum);
- }
+ int i, j;
+ int N, M;
+ int stride;
+ M = layer->nb_inputs;
+ N = layer->nb_neurons;
+ stride = N;
+ for (i=0;i<N;i++)
+ {
+ /* Compute update gate. */
+ float sum = layer->bias[i];
+ for (j=0;j<M;j++)
+ sum += layer->input_weights[j*stride + i]*input[j];
+ output[i] = sum;
+ }
+ if (layer->sigmoid) {
+ for (i=0;i<N;i++)
+ output[i] = sigmoid_approx(output[i]);
+ } else {
+ for (i=0;i<N;i++)
+ output[i] = tansig_approx(output[i]);
+ }
+}
+
+void compute_gru(const GRULayer *gru, float *state, const float *input)
+{
+ int i, j;
+ int N, M;
+ int stride;
+ float z[MAX_NEURONS];
+ float r[MAX_NEURONS];
+ float h[MAX_NEURONS];
+ M = gru->nb_inputs;
+ N = gru->nb_neurons;
+ stride = 3*N;
+ for (i=0;i<N;i++)
+ {
+ /* Compute update gate. */
+ float sum = gru->bias[i];
+ for (j=0;j<M;j++)
+ sum += gru->input_weights[j*stride + i]*input[j];
+ for (j=0;j<N;j++)
+ sum += gru->recurrent_weights[j*stride + i]*state[j];
+ z[i] = sigmoid_approx(sum);
+ }
+ for (i=0;i<N;i++)
+ {
+ /* Compute reset gate. */
+ float sum = gru->bias[N + i];
+ for (j=0;j<M;j++)
+ sum += gru->input_weights[N + j*stride + i]*input[j];
+ for (j=0;j<N;j++)
+ sum += gru->recurrent_weights[N + j*stride + i]*state[j];
+ r[i] = sigmoid_approx(sum);
+ }
+ for (i=0;i<N;i++)
+ {
+ /* Compute output. */
+ float sum = gru->bias[2*N + i];
+ for (j=0;j<M;j++)
+ sum += gru->input_weights[2*N + j*stride + i]*input[j];
+ for (j=0;j<N;j++)
+ sum += gru->recurrent_weights[2*N + j*stride + i]*state[j]*r[j];
+ h[i] = z[i]*state[i] + (1-z[i])*tansig_approx(sum);
+ }
+ for (i=0;i<N;i++)
+ state[i] = h[i];
+}
+
+#if 0
+int main() {
+ float state[12] = {0};
+ float input[25];
+ float out0[16];
+ float out[2];
+ while (1)
+ {
+ int i;
+ for (i=0;i<25;i++) scanf("%f", &input[i]);
+ if (feof(stdin)) break;
+ compute_dense(&layer0, out0, input);
+ compute_gru(&layer1, state, out0);
+ compute_dense(&layer2, out, state);
+ printf("%f %f\n", out[0], out[1]);
+ }
}
#endif
diff --git a/src/mlp.h b/src/mlp.h
index 618e246e..eba3b30b 100644
--- a/src/mlp.h
+++ b/src/mlp.h
@@ -1,43 +1,30 @@
-/* Copyright (c) 2008-2011 Octasic Inc.
- Written by Jean-Marc Valin */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+#ifndef MLP_H
+#define MLP_H
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+#define MAX_NEURONS 20
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef _MLP_H_
-#define _MLP_H_
-
-#include "arch.h"
+typedef struct {
+ const float *bias;
+ const float *input_weights;
+ int nb_inputs;
+ int nb_neurons;
+ int sigmoid;
+} DenseLayer;
typedef struct {
- int layers;
- const int *topo;
- const float *weights;
-} MLP;
+ const float *bias;
+ const float *input_weights;
+ const float *recurrent_weights;
+ int nb_inputs;
+ int nb_neurons;
+} GRULayer;
+
+const DenseLayer layer0;
+const GRULayer layer1;
+const DenseLayer layer2;
-extern const MLP net;
+void compute_dense(const DenseLayer *layer, float *output, const float *input);
-void mlp_process(const MLP *m, const float *in, float *out);
+void compute_gru(const GRULayer *gru, float *state, const float *input);
-#endif /* _MLP_H_ */
+#endif
diff --git a/src/mlp_data.c b/src/mlp_data.c
index a819880b..d0cdab95 100644
--- a/src/mlp_data.c
+++ b/src/mlp_data.c
@@ -1,112 +1,420 @@
+/*This file is automatically generated from a Keras model*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "mlp.h"
-/* RMS error was 0.280492, seed was 1480478173 */
-/* 0.005976 0.031821 (0.280494 0.280492) done */
+static const float layer0_weights[400] = {
+ -0.0323158912361, -0.00303377886303, -0.0239897016436, 0.0642878934741,
+ -0.148724451661, -0.108212910593, -0.0010479624616, -0.00877434946597,
+ -0.0168603677303, 0.0488462261856, 0.0295083839446, -0.0956341475248,
+ 0.162604004145, 0.0650868043303, 0.112971425056, 0.054060626775,
+ 0.0738321393728, 0.0839241966605, 0.165590450168, -0.125556588173,
+ 0.370251566172, 0.336382567883, -0.778188586235, 0.332034885883,
+ 0.0902683138847, -0.0467064678669, -0.0247442834079, -0.546521365643,
+ -0.13690982759, -0.42568898201, 0.360105246305, 0.131251722574,
+ 0.0236387141049, 0.249162137508, -0.300948262215, -0.160730034113,
+ 0.252145469189, 0.00761577021331, 0.358103126287, 0.247446134686,
+ 0.213032737374, -0.523938000202, 0.47589853406, -0.288423031569,
+ 0.314188957214, -0.0150110255927, -0.235768511891, 0.377363353968,
+ 0.189057052135, 0.367094039917, -0.0377288423479, -0.0821162983775,
+ -0.483217805624, 0.134456858039, 0.245913609862, 0.163557529449,
+ 0.55442160368, -0.0674653798342, -0.18559153378, -0.0737410783768,
+ 0.307655662298, -0.0554520338774, 0.0563021153212, 0.267186552286,
+ 0.0477872267365, -0.3530420959, -0.106208980083, -0.111178167164,
+ 0.0456478744745, 0.0147303184494, -0.313271969557, -0.0479304753244,
+ -0.167296499014, 0.454104423523, -0.140122458339, -0.125991210341,
+ -0.0905930176377, 0.0837185308337, -0.0620072521269, -0.4797129035,
+ 0.114789649844, -0.380749166012, -0.427245497704, 0.100610218942,
+ -0.178263708949, -0.137401625514, -0.721200764179, 0.081981100142,
+ -0.0449513420463, -0.0118511253968, 0.168111532927, 0.178249523044,
+ 0.153161272407, -0.090089187026, -0.190736114979, -0.15260013938,
+ 0.187330916524, -0.159462213516, -0.167896524072, -0.292924940586,
+ -0.340123087168, -0.193891510367, -0.444311708212, -0.173613116145,
+ 0.203043878078, 0.179829373956, -0.413448572159, 0.30758818984,
+ -0.30246168375, 0.449016183615, 0.567438423634, -0.231529101729,
+ -0.0398529618979, -0.0884106606245, -0.0209326203912, 0.0969439446926,
+ 0.140491902828, -0.361514776945, 0.13586255908, 0.100939773023,
+ 0.551742434502, 0.127141162753, -0.0176616143435, 0.404968261719,
+ -0.0841330140829, -0.116868361831, -0.174421861768, -0.0706064626575,
+ -0.0744979307055, -0.284513831139, -0.347189664841, 0.0179580822587,
+ 0.0507398098707, 0.0417955368757, -0.419450342655, 0.0223722532392,
+ -0.144491657615, 0.343089699745, 0.360686272383, -0.0818987563252,
+ 0.175669848919, -0.133880525827, 0.138170257211, -0.252974122763,
+ -0.108684010804, 0.0870730802417, -0.21820537746, 0.0718786865473,
+ -0.0444530323148, 0.565499305725, 0.281036019325, 0.0585397519171,
+ -0.345470309258, 0.467493206263, -0.187122374773, -0.0662520900369,
+ -0.120582558215, -0.336202502251, -0.0275628101081, -0.109555095434,
+ 0.0386775135994, 0.12203156203, -0.437479436398, -0.324836909771,
+ 0.0538799539208, -0.072494097054, 0.488587260246, -0.0859706401825,
+ 0.190449699759, 0.166791275144, 0.285706937313, -0.0741383060813,
+ 0.550565361977, 0.230250611901, 0.162517026067, -0.349773913622,
+ 0.0105479694903, 0.0750306993723, 0.065382681787, -0.228071928024,
+ -0.160722598433, 0.0917200818658, -0.0459088385105, -0.110735662282,
+ -0.0069907004945, 0.00544097088277, -0.0775546208024, 0.393054425716,
+ -0.118612743914, 0.382568657398, -0.232776120305, -0.00465270923451,
+ 0.248485997319, -0.188449129462, 0.159600287676, -0.356400460005,
+ 0.0214841272682, 0.0801755860448, 0.226819097996, 0.208304002881,
+ -0.101520627737, 0.192027911544, 0.0274125896394, 0.23626793921,
+ -0.0622767545283, 0.407991111279, -0.331200152636, -0.112337358296,
+ 0.260650724173, 0.260296612978, -0.52185767889, -0.556461453438,
+ -0.550842344761, 0.214734092355, -0.120670177042, -0.00651343818754,
+ 0.397080928087, 0.281110674143, 0.0471108481288, 0.395579278469,
+ 0.30211648345, 0.373633533716, -0.0601020902395, -0.175510212779,
+ 0.238135889173, -0.159989282489, -0.21160839498, -0.896661877632,
+ 0.0929339826107, 0.173671662807, 0.568135917187, -0.043400298804,
+ 0.337467908859, -0.203457206488, -0.449903279543, 0.101133674383,
+ 0.0337416604161, -0.334901988506, 0.219390168786, 0.236708894372,
+ -0.127554669976, 0.206830412149, -0.0761405676603, 0.115451343358,
+ 0.0657462328672, -0.0814586728811, -0.0622754357755, 0.229584246874,
+ 0.114770509303, 0.211035519838, -0.255108118057, -0.226068750024,
+ 0.176190361381, -0.258617371321, 0.290156245232, -0.110876627266,
+ -0.0776041671634, 0.0210558660328, -0.197993040085, -0.0519515201449,
+ -0.064360268414, 0.110460229218, -0.175299793482, -0.308120578527,
+ 0.0573027133942, -0.112658061087, -0.0094823082909, -0.0882702320814,
+ 0.210206672549, -0.423709273338, 0.193589061499, 0.346617430449,
+ -0.0543467737734, 0.312646657228, -0.454329788685, -0.806477546692,
+ -0.0198467709124, 0.136386469007, 0.338044077158, -0.303807944059,
+ 0.111034229398, 0.103379778564, -0.729765236378, -0.110861070454,
+ 0.405209124088, -0.890849173069, -0.215841382742, -0.070955850184,
+ -0.365953058004, -0.599757015705, -0.261233866215, -0.532322108746,
+ -0.441515952349, 0.262585818768, 0.0353154279292, 0.738994061947,
+ -0.483434826136, -0.222508788109, -0.512043178082, 0.496185690165,
+ 0.946191251278, -0.743989050388, 0.250832021236, 0.590731084347,
+ 0.0497207865119, -0.244995892048, -0.318788975477, 0.193770542741,
+ 0.265268146992, 0.197007849813, -0.183523058891, -0.0851827263832,
+ -0.000694269256201, 0.213775068521, -0.103927090764, -0.21129052341,
+ 0.0327039211988, -0.0653979331255, -0.265737205744, 0.042615506798,
+ -1.79167401791, -0.599680006504, -2.83741140366, 1.74978005886,
+ -1.93533468246, -1.20661664009, -1.00788760185, 2.21961712837,
+ 2.84307765961, 2.09195709229, 1.77299404144, -2.08730006218,
+ -1.67541027069, 1.44096076488, -2.2328517437, 0.658311545849,
+ -0.276201993227, -0.0050591873005, -0.569467484951, 0.505478560925,
+ -0.42339399457, 0.0354712642729, -0.0833605602384, 0.718164682388,
+ 0.27618932724, 0.394800692797, 0.176689192653, -0.367860108614,
+ -0.23422960937, -0.319946885109, -0.321368843317, -0.269234418869,
+ 0.0583118088543, -1.12940633297, 0.354461491108, -0.388129651546,
+ 0.663038134575, 0.920168936253, 0.804862141609, 0.313400477171,
+ -0.0513863787055, -0.234536468983, -0.894398093224, 0.284333974123,
+ -0.142498314381, 0.274043083191, 0.59805727005, -0.301966279745,
+ 1.4220430851, 1.71942412853, 1.05325949192, 1.27318322659,
+ 1.34898400307, -1.64807569981, -0.98875272274, -2.88443303108,
+ -2.41240000725, -0.499946832657, -0.128036171198, 0.49603074789,
+ -1.69579660892, -0.00854617077857, 0.241448372602, -0.772468924522,
+ 0.968422949314, 0.632322132587, -0.033443428576, 0.70835596323,
+ -0.217428967357, 0.312794595957, 0.145282953978, -0.656989097595,
+ -0.517754852772, -0.352638185024, 0.835552573204, -0.0556758232415,
+ -1.53804886341, -0.0920207053423, 0.279766201973, -1.61213707924
+};
+
+static const float layer0_bias[16] = {
+ -0.303523093462, 0.231883555651, -0.168693870306, 0.153030633926,
+ -0.15153889358, 0.009276795201, -0.0687525719404, -0.215511903167,
+ 0.182170331478, -0.0780090019107, 0.164791062474, -0.294568121433,
+ -0.0566078536212, -0.114215672016, -0.174605086446, 0.102028906345
+};
+
+static const float layer1_weights[576] = {
+ -0.522570133209, -0.215709328651, 0.52252215147, -0.00494204228744,
+ 0.0127760116011, 0.291274160147, -0.638745367527, -0.0365918949246,
+ 0.00665773451328, -0.0678943693638, -0.128588020802, -0.0199536010623,
+ -0.0895647928119, 0.280953139067, 0.0589722134173, -0.224328830838,
+ 0.221208155155, 0.471658885479, -0.295176237822, -0.0404131039977,
+ -0.0845822691917, 0.138315945864, 0.299626260996, -0.712264537811,
+ 0.179080381989, 0.0246356502175, -0.56250667572, -0.107999697328,
+ 0.237200707197, 0.136439889669, -0.0215215981007, 0.62332624197,
+ 0.864365100861, -0.107216350734, 0.170461207628, -0.560622572899,
+ -0.421275615692, 0.272708386183, 0.346472173929, -0.00408073235303,
+ 0.107470363379, -0.484706372023, -0.0365097410977, 0.279600679874,
+ 0.686104357243, 0.779748260975, 1.1843868494, 0.166178449988,
+ 0.248035773635, 0.349735587835, 0.0379782728851, 0.168923527002,
+ -0.0503577366471, -0.133248448372, -0.0537593513727, 0.0869362577796,
+ -0.293914884329, -0.188873872161, 0.29669803381, 0.418996572495,
+ 0.045029103756, -0.0859103947878, -0.0168279726058, 0.351764529943,
+ 0.0609794519842, 0.15456995368, -0.390625238419, 0.621307253838,
+ 0.231192305684, -0.247329562902, -0.402819275856, -0.350487977266,
+ -0.689312458038, -0.0517355762422, 0.452691793442, -0.353889375925,
+ 0.0278191901743, 0.351379901171, -0.502407252789, 1.30162894726,
+ 0.101528838277, 0.449380904436, 0.346550732851, -0.25486344099,
+ -0.135015398264, -0.515076100826, 0.316528081894, -0.278929710388,
+ 0.19324311614, -0.00735334865749, 0.0629513636231, 0.326953828335,
+ 0.295027941465, -0.169076040387, 0.636266410351, -0.137672334909,
+ -0.407657295465, -0.157367348671, -0.0767443552613, -0.230652302504,
+ 0.00748418923467, -0.408101201057, 0.015459837392, 0.0823806077242,
+ 0.361282140017, -0.00614223070443, 0.132443353534, -0.0891029387712,
+ -0.221948981285, -0.398524433374, 0.514336466789, -0.17689576745,
+ -0.26833692193, 0.127452015877, 0.472479611635, 0.0939884111285,
+ 0.390737742186, 0.0611877292395, 1.12542176247, -0.0247492864728,
+ 0.0377239957452, 0.255676537752, 0.581585109234, 0.489182978868,
+ 0.249199658632, -0.0590252429247, 0.721937835217, -0.425795644522,
+ -0.339238762856, -0.134428411722, 0.0567951500416, 0.142763510346,
+ -0.180426225066, -0.154287457466, -0.19063706696, 0.263442724943,
+ -0.212396726012, 0.455459117889, -0.40250736475, 0.292495936155,
+ 0.410862922668, 0.00764275388792, -0.271768718958, -0.45541074872,
+ 0.413473844528, -0.369704782963, -0.243632271886, -0.253229081631,
+ 0.399759143591, 0.367699205875, 0.196565434337, 0.0227527376264,
+ -0.651600599289, -0.0545405596495, -0.451371461153, -1.03132557869,
+ -0.07564856112, 0.10696028173, 0.537421524525, 0.0211554728448,
+ -0.153573140502, 0.273194342852, -0.0923355445266, 0.265719622374,
+ -0.188114359975, -0.309555053711, -0.346920281649, -0.0465225316584,
+ 0.0445860028267, -0.194975554943, 0.0114441188052, -0.0303909294307,
+ 0.252927958965, 0.0944781452417, -0.322130352259, 0.0730012431741,
+ 0.410704612732, -0.402780264616, 0.115643382072, -0.291800051928,
+ 1.08942389488, 0.180483043194, 0.353424668312, 0.391426712275,
+ 0.22338964045, -0.150193423033, -0.0853259339929, -0.0959483161569,
+ -0.96565502882, 0.0328196175396, 0.228199854493, 0.45419806242,
+ -0.211965039372, 0.295327186584, -0.225741535425, -0.198361888528,
+ -0.41481718421, 0.487569749355, -0.367649972439, 0.376769393682,
+ 0.135480776429, -0.0752370730042, 0.4845662117, -0.183017745614,
+ 0.0395289547741, 0.0494538173079, 0.0604358948767, -0.308838278055,
+ -0.091990314424, -0.210955351591, 0.0330170169473, 0.0410580411553,
+ -0.0365600287914, -0.217160567641, 0.515726149082, -0.00554477749392,
+ -0.698458611965, -0.093190588057, -0.286243915558, -0.833708167076,
+ 0.0826757997274, 0.637517035007, -0.321009606123, 0.110991425812,
+ -0.0250737871975, 0.0387859605253, -0.136812880635, -0.272993475199,
+ 0.10945378989, 0.571907043457, 0.66392749548, -0.0314018465579,
+ 0.493993610144, -0.155551761389, 0.140523731709, -0.254005461931,
+ 0.165827706456, 0.323721557856, -0.284176260233, -0.0790910348296,
+ -0.43700286746, -0.180028766394, 0.184196278453, -0.440234959126,
+ 0.123197294772, -0.223248958588, 0.228162929416, -0.00130064447876,
+ 0.0413398332894, 0.194938391447, -0.00608651619405, 0.00307316891849,
+ 0.309140145779, -0.0119955046102, -1.23261833191, 0.473375469446,
+ -0.547446370125, -0.176608234644, 0.160049378872, 0.431185215712,
+ -0.514484167099, -0.528000354767, -0.0508379936218, 0.324675768614,
+ -0.405204623938, 0.329819649458, -0.462489902973, -0.473745524883,
+ -0.814044177532, -0.755483746529, -0.162108674645, 0.443795591593,
+ -0.730419099331, -0.0533101335168, -0.0555486418307, -0.48197427392,
+ -0.198148399591, 0.241903603077, 0.639134824276, 0.214409351349,
+ 0.157725349069, 0.234148457646, 0.065986700356, -0.230438381433,
+ -0.560171961784, 0.266687035561, 0.471683681011, 0.261425942183,
+ 0.0701066032052, 0.252742856741, -0.403794080019, -0.25176975131,
+ -0.384608864784, -0.59188747406, -0.86546176672, -0.0257764458656,
+ -0.886318266392, -0.685094118118, -0.141456633806, 0.198469951749,
+ -0.318221509457, 0.229807168245, -0.444818228483, 0.397571474314,
+ 0.130867511034, -0.324128657579, 0.0869098380208, -0.615828871727,
+ 0.486391454935, -0.113560400903, 0.056425075978, 0.373532027006,
+ 0.0913096293807, -0.0532204844058, 0.311410963535, 0.289847016335,
+ -0.347476035357, -0.000210040918319, 0.427851736546, 0.536431849003,
+ -0.0864822268486, 0.184324681759, 0.336998999119, 0.548549354076,
+ -0.141191855073, 0.0501529537141, 0.0642771273851, -0.221054032445,
+ -0.440462350845, -0.00777774676681, -0.037262365222, -0.429329514503,
+ -0.341213852167, -0.175788700581, -0.0855256766081, -0.40170314908,
+ 0.160790473223, -0.110896132886, -0.991561830044, -0.353081554174,
+ -0.254929035902, 0.243362858891, 0.246446549892, -0.674746394157,
+ 0.255156964064, -0.0702143758535, 0.107576854527, -0.173418879509,
+ 0.236368760467, 0.240350931883, -0.138045549393, -0.0761117264628,
+ -0.169206470251, -0.063291490078, 0.678845524788, -0.0810762122273,
+ -0.30112567544, 0.298012137413, -0.394045203924, 0.421982526779,
+ 0.470368921757, -0.286221832037, 0.192414373159, 0.0346411056817,
+ -0.159265741706, 0.15992231667, 0.0222053900361, 0.387874037027,
+ -0.783137738705, 0.157563239336, -0.230539754033, -0.265851557255,
+ 0.439003497362, 0.0386669375002, -0.219953969121, 0.0966807678342,
+ 0.248320207, 0.114540457726, 0.115389026701, 0.162848830223,
+ -0.296419143677, -0.00346902781166, 0.0937352776527, 0.187126338482,
+ 0.247630536556, -0.13067536056, 0.118643291295, 0.252249121666,
+ -0.153242886066, 0.0231541693211, -0.199601560831, 0.0974061563611,
+ -0.0431248806417, -0.071029253304, -0.0462808422744, -0.182361230254,
+ -0.785562396049, 0.291260093451, 0.268405675888, -0.31384241581,
+ -0.261928677559, -0.111975073814, -0.426551371813, 0.467075139284,
+ 0.179799303412, 0.290041208267, -0.00743306009099, 0.185776531696,
+ -0.471305310726, -0.033614397049, -0.258747786283, 0.160383373499,
+ 0.170422181487, -0.0762250497937, -0.416067481041, -0.318200290203,
+ 0.122206896544, 0.345256865025, -0.300392091274, -0.732382774353,
+ -0.131387367845, 0.439928114414, -0.208092331886, -0.297138899565,
+ 0.180248990655, -0.156759992242, -0.256862491369, 0.0389472842216,
+ 0.290808230639, -0.531257688999, 0.176970034838, -0.228053331375,
+ 0.43936920166, -0.168351590633, -0.223915338516, 0.584147512913,
+ -0.994908034801, -0.52039784193, -0.138552069664, 0.109670616686,
+ 0.59787094593, 0.358944237232, -0.0985295549035, 0.933246552944,
+ 0.199623763561, 0.27762901783, -0.365503460169, 0.137234345078,
+ -0.252923458815, -0.28658592701, -0.210913330317, -0.0255936458707,
+ -0.291039079428, 0.47262096405, 0.355297535658, -0.00377047341317,
+ -0.0535984151065, 0.0331581272185, -0.016416573897, -0.222786843777,
+ -0.0597904250026, -0.43767374754, -0.127143412828, -0.483784765005,
+ -0.00128357531503, 0.290082752705, 0.303069144487, -0.0148378023878,
+ -0.457621783018, -0.0347821079195, -0.6266040802, -0.28104698658,
+ 0.195556372404, -0.418248951435, -1.02496337891, -0.376780867577,
+ 0.335245490074, -0.592925965786, -0.261242508888, -0.66796797514,
+ -0.673883378506, -0.077078461647, 0.335528790951, -0.317626059055,
+ -0.439437419176, -0.163715720177, -0.55574631691, -0.176876798272,
+ 0.0728060752153, 0.172325640917, -0.353794813156, -0.159553050995,
+ -0.0962017849088, 0.0072228256613, 0.144398912787, 0.139783024788,
+ -0.0355707406998, 0.487085849047, 0.0584977045655, -0.0357882939279,
+ 0.111334010959, 0.00182023190428, -0.307305157185, 0.0293312612921,
+ 0.834492623806, 0.0792198777199, -0.624731957912, 0.540135383606,
+ -0.514088690281, 0.195271298289, 0.0388798974454, 0.459697574377,
+ -0.14106580615, -0.305169314146, -0.675598680973, 0.40424323082,
+ 0.0685443505645, -0.78780734539, -0.110590666533, -0.0565226599574,
+ 0.117205530405, -0.317176222801, 0.54548817873, 0.0273623391986,
+ -0.302901446819, -0.187410980463, 0.225310251117, -0.19477878511,
+ 0.0420750640333, 0.0623318403959, -0.0501642599702, 0.20397734642,
+ 0.0744508579373, -0.201581388712, -0.114736273885, 0.0401433482766,
+ -0.402742773294, 0.396253436804, 0.234317049384, -0.407419502735,
+ -0.137959763408, 0.13517652452, 0.00941345840693, 0.0255322568119,
+ -0.765650749207, -0.781978905201, -0.291105687618, 0.748619616032,
+ 0.274888604879, 0.805818200111, 0.454954862595, -0.329479753971,
+ -0.372410297394, 0.321489214897, 0.150394409895, -0.369782596827,
+ 0.0920933783054, 0.153387010098, 0.0375887304544, 0.103276476264,
+ 0.30682554841, 0.453999042511, -0.0159632079303, 0.433277547359,
+ 0.0146259190515, 0.00186796032358, -0.419960200787, 0.221726089716,
+ 0.250871419907, -0.117014057934, 0.483646512032, -0.431229442358,
+ -0.425591468811, 0.187843218446, -0.195544555783, 0.626623153687
+};
+
+static const float layer1_recur_weights[432] = {
+ -0.452553063631, -0.132692337036, 0.435972452164, 0.23535464704,
+ -0.142962694168, -1.0269882679, 1.33350193501, 0.454003751278,
+ -0.723765194416, 0.122067563236, -0.652271389961, 0.172375023365,
+ -0.0586017891765, -0.526772975922, -0.0575365759432, -0.400594621897,
+ 0.143612116575, -0.209239631891, -0.0656021535397, -0.240420848131,
+ 0.0361819081008, -0.312424659729, 0.323340117931, 0.865863740444,
+ 0.74458104372, -0.647752523422, -0.0193908512592, 0.380856305361,
+ -0.595617830753, 0.0896989777684, 0.57212471962, -0.204812467098,
+ 0.107230603695, 0.308459758759, -0.176606357098, 0.0687809064984,
+ -0.398555696011, 0.282406151295, 0.0576757565141, -0.161326959729,
+ -0.468534052372, -0.0212322007865, -0.598662257195, 0.00917398370802,
+ 0.575137555599, 0.762226641178, -0.124809287488, 0.314141869545,
+ 0.137552574277, 0.090269908309, -0.462145775557, 0.521303772926,
+ -0.527565479279, -0.0520281381905, -0.035842679441, -0.058115940541,
+ -0.0747543051839, 0.447229593992, 0.0228719189763, -0.0878588557243,
+ -0.306484937668, 0.843043982983, -0.105646915734, 0.0453350059688,
+ 0.632113993168, 0.000428808212746, -0.282452434301, 0.175415590405,
+ -0.466631114483, -0.448604494333, 0.186479955912, -0.552877664566,
+ -0.311158925295, 0.370681673288, -0.255207180977, -0.225731387734,
+ -0.664043426514, -1.03887057304, 0.354280054569, 0.0835113599896,
+ 0.250702798367, 0.286079913378, 0.469435572624, 0.168938979506,
+ 0.0820068344474, -0.540718853474, 0.159294754267, 0.391294717789,
+ -0.185321509838, -0.0663113668561, 0.0500289201736, 0.130789130926,
+ -0.0722037479281, -0.117809429765, 0.351526975632, 0.292593210936,
+ -0.0175467673689, -0.0830210894346, 1.56263923645, -0.059062782675,
+ 0.00325699080713, -0.049966789782, 0.537900447845, -0.215317204595,
+ -0.0872520208359, 0.507028341293, -0.102160297334, 0.0824331566691,
+ -0.795883595943, 0.0838221982121, 1.00332140923, -0.529142200947,
+ -0.25297704339, -0.904749631882, 1.13887095451, 0.312844961882,
+ 0.122084908187, 0.662144958973, -0.146630585194, 0.694327116013,
+ -0.0393287278712, -0.0715936198831, 0.039289906621, -0.669278681278,
+ 0.333027422428, -0.467038750648, 0.436147242785, 0.0122460229322,
+ -0.246365830302, -0.173088088632, -0.10290825367, 0.489002674818,
+ 0.0353933945298, -0.484753161669, 0.220499202609, 0.297908723354,
+ -0.303398698568, 0.577771365643, -0.110243886709, 0.334864616394,
+ 0.946870565414, -0.209082424641, 0.0003671530867, 0.164891660213,
+ 0.0328881405294, -0.873907387257, -0.201741367579, 0.372785240412,
+ -0.156225472689, 0.0980780795217, -0.449654281139, -0.0527306348085,
+ -0.161607861519, 0.482428252697, -0.455310225487, -0.486004650593,
+ -0.165396779776, -0.161932840943, -0.0907418951392, 0.441892385483,
+ -0.272828102112, 0.432543545961, -0.189364179969, -0.229362457991,
+ 0.293409526348, 0.521940648556, -0.34962439537, -0.407121777534,
+ -0.763013958931, 0.738575279713, -0.0208411999047, -0.598193883896,
+ 0.578357040882, -0.751649618149, -0.231500208378, 0.0251036770642,
+ -0.143751770258, -0.211763620377, 1.20679891109, -0.038414619863,
+ -0.447570919991, -0.463149160147, 0.280711233616, 0.0595862083137,
+ 0.776092469692, 0.123352192342, 0.320925146341, -0.0920038297772,
+ 0.168815553188, 0.0677221789956, 0.116023115814, -0.502238571644,
+ -0.563070237637, 0.156379252672, 0.358413517475, -0.748315691948,
+ 0.127692997456, -0.344275176525, -0.255532771349, 0.406024962664,
+ -0.388099551201, -0.528909087181, -0.436803430319, 0.0440042726696,
+ 0.620687305927, -0.393046349287, 0.141953513026, 0.0212335959077,
+ -0.76162225008, 0.156396090984, 0.284152626991, 0.0219077561051,
+ 0.853115797043, -0.10241150856, -0.140150725842, -0.135387554765,
+ 0.0161694791168, 0.446941494942, -0.00954414065927, -0.550665080547,
+ -0.741837620735, -0.399239182472, 0.15147125721, 0.600682795048,
+ -0.442906796932, -0.122772581875, -0.104009695351, 0.112125054002,
+ -0.100993037224, -0.19147144258, 0.071312956512, -0.160170570016,
+ 0.162945926189, -0.348353236914, 0.116792708635, 0.142075359821,
+ 0.239738717675, 0.122880585492, 0.0505255125463, 0.0346812568605,
+ 0.498441874981, -0.568510591984, 0.535405158997, 0.419487953186,
+ -0.307099789381, 0.0245685596019, 0.26256236434, -0.268933296204,
+ 0.348654359579, 0.12082593888, -0.352393358946, 0.203653022647,
+ -0.27051076293, -0.352152913809, -0.132526323199, 0.234728828073,
+ 0.447653383017, 0.00618638051674, -0.394140124321, 0.511299073696,
+ -1.59117734432, 0.292400926352, -0.561656177044, -0.42333355546,
+ 0.00693078571931, -0.0559035353363, 0.0543710961938, -0.253388464451,
+ -0.320838302374, -0.00155272823758, 0.11170655489, -0.294798642397,
+ 0.273453950882, -0.579788923264, -0.491958320141, -0.28640204668,
+ -0.0612994320691, -0.159366354346, -0.987418711185, 0.402318716049,
+ -0.0261803921312, 0.258768498898, -0.114473260939, 1.2299156189,
+ 0.242737755179, -0.211875244975, -0.139043226838, 0.160730332136,
+ 0.0360462367535, -0.261830985546, 0.240572214127, 0.518445432186,
+ 0.482195794582, 0.205660715699, 0.0796600058675, -0.022593896836,
+ 0.0788994953036, 0.145666480064, 0.0452436134219, -0.322669267654,
+ -0.0401082970202, 0.0377841182053, 0.237459301949, -0.244877845049,
+ 0.616710603237, 0.275007605553, -0.0396856851876, -0.46906003356,
+ -0.0952326208353, -0.182165116072, 0.743020236492, -0.486613333225,
+ -0.0164099577814, 0.0917626395822, 0.141138345003, -0.315690338612,
+ -0.263476163149, 0.0650237947702, -0.237912908196, -0.271480619907,
+ 0.653724253178, 0.0804069787264, 0.290768176317, -0.129948750138,
+ 0.487085968256, -0.0732090473175, 0.940254211426, 0.0624024793506,
+ -0.102592132986, -0.587187886238, 0.761258304119, 0.129639089108,
+ 2.5648291111, 0.704618871212, 0.418304383755, 0.523407042027,
+ 0.0256035663188, -0.17384378612, 0.0902314484119, 0.35451990366,
+ -0.279436171055, -0.546348929405, 0.322409600019, 0.257187694311,
+ -0.0183712877333, -0.253891319036, -0.14673063159, 0.183456793427,
+ 0.0756894722581, 0.0166793111712, 0.063424885273, -0.0292232837528,
+ 0.0970966443419, -0.289316534996, -0.336616665125, -0.402449935675,
+ -0.172684147954, 0.708057820797, -0.00296134827659, 0.0553894080222,
+ 0.52332931757, 0.656760931015, -0.381050169468, -0.4464404881,
+ 0.53847771883, 0.0569440722466, -0.726181507111, -0.295940220356,
+ -0.859719693661, -0.491242974997, 0.710143506527, -0.0812560319901,
+ 0.241215750575, 0.535235524178, 0.0550559647381, 0.238179832697,
+ 0.103540532291, 0.359084814787, 0.10529333353, -0.142829358578,
+ 0.0888735279441, 0.623815834522, 0.0146289942786, -0.566250443459,
+ -0.0366028472781, 0.679254829884, 0.641758620739, -0.206064254045,
+ 0.408038169146, -0.770618975163, -0.239708095789, -0.286123871803,
+ 0.143254160881, -0.0863332822919, 0.316140592098, 0.305331349373,
+ -0.163903400302, -0.0637780874968, -0.0573746971786, -0.27413007617,
+ -0.465396523476, -0.554719746113, 0.414455145597, 0.271741509438,
+ 0.0738094374537, -0.313472211361, -0.240798667073, 0.666478455067,
+ 0.175529286265, 0.163228735328, -0.123721204698, 0.0589852109551,
+ 0.330106735229, -0.259028285742, 0.390883088112, 0.127993643284,
+ 0.51758992672, 0.305824249983, 0.0312183462083, 0.376155942678,
+ 0.101521216333, -0.45689329505, 0.231268882751, 0.445106834173,
+ -0.432061940432, -0.114180408418, 0.58759355545, -0.110202774405,
+ -0.381636232138, -0.205732613802, -0.216400712729, 0.503538429737
+};
+
+static const float layer1_bias[36] = {
+ 0.753631353378, 0.149672612548, 0.205860882998, 0.412640750408,
+ 0.958067595959, 0.300810903311, 0.927109181881, -0.279771864414,
+ 0.22046084702, 0.680736124516, 0.627509713173, 0.263323485851,
+ 0.470625072718, 0.305385112762, 0.197198927402, 0.211999595165,
+ 0.356875658035, 0.0792600512505, 0.483828574419, 0.202769398689,
+ -0.159682109952, -0.399690449238, 0.390602350235, 0.542564332485,
+ 0.0687586590648, -0.1056195274, 0.416202038527, 0.0684336572886,
+ -0.164995282888, 0.0981028005481, 0.179638549685, -0.107678905129,
+ -0.397850632668, 0.711084902287, 0.00309998891316, 0.167615786195
+};
+
+static const float layer2_weights[24] = {
+ 0.974186122417, 0.235169991851, -1.30483865738, 0.695970416069,
+ -0.13816614449, 2.06951856613, 1.59347617626, 0.326933383942,
+ -1.94393444061, -0.46444183588, 1.63986241817, -0.35400146246,
+ 0.0870011672378, 0.380246907473, 0.550117731094, -1.43154609203,
+ -0.48673582077, -2.0755841732, -0.198610499501, 2.51751732826,
+ -1.40849792957, 0.331694245338, 1.05997574329, 0.96008425951
+};
-static const float weights[450] = {
+static const float layer2_bias[2] = {
+ 0.0341319479048, 0.90079587698
+};
-/* hidden layer */
--0.514624f, 0.0234227f, -0.14329f, -0.0878216f, -0.00187827f,
--0.0257443f, 0.108524f, 0.00333881f, 0.00585017f, -0.0246132f,
-0.142723f, -0.00436494f, 0.0101354f, -0.11124f, -0.0809367f,
--0.0750772f, 0.0295524f, 0.00823944f, 0.150392f, 0.0320876f,
--0.0710564f, -1.43818f, 0.652076f, 0.0650744f, -1.54821f,
-0.168949f, -1.92724f, 0.0517976f, -0.0670737f, -0.0690121f,
-0.00247528f, -0.0522024f, 0.0631368f, 0.0532776f, 0.047751f,
--0.011715f, 0.142374f, -0.0290885f, -0.279263f, -0.433499f,
--0.0795174f, -0.380458f, -0.051263f, 0.218537f, -0.322478f,
-1.06667f, -0.104607f, -4.70108f, 0.312037f, 0.277397f,
--2.71859f, 1.70037f, -0.141845f, 0.0115618f, 0.0629883f,
-0.0403871f, 0.0139428f, -0.00430733f, -0.0429038f, -0.0590318f,
--0.0501526f, -0.0284802f, -0.0415686f, -0.0438999f, 0.0822666f,
-0.197194f, 0.0363275f, -0.0584307f, 0.0752364f, -0.0799796f,
--0.146275f, 0.161661f, -0.184585f, 0.145568f, 0.442823f,
-1.61221f, 1.11162f, 2.62177f, -2.482f, -0.112599f,
--0.110366f, -0.140794f, -0.181694f, 0.0648674f, 0.0842248f,
-0.0933993f, 0.150122f, 0.129171f, 0.176848f, 0.141758f,
--0.271822f, 0.235113f, 0.0668579f, -0.433957f, 0.113633f,
--0.169348f, -1.40091f, 0.62861f, -0.134236f, 0.402173f,
-1.86373f, 1.53998f, -4.32084f, 0.735343f, 0.800214f,
--0.00968415f, 0.0425904f, 0.0196811f, -0.018426f, -0.000343953f,
--0.00416389f, 0.00111558f, 0.0173069f, -0.00998596f, -0.025898f,
-0.00123764f, -0.00520373f, -0.0565033f, 0.0637394f, 0.0051213f,
-0.0221361f, 0.00819962f, -0.0467061f, -0.0548258f, -0.00314063f,
--1.18332f, 1.88091f, -0.41148f, -2.95727f, -0.521449f,
--0.271641f, 0.124946f, -0.0532936f, 0.101515f, 0.000208564f,
--0.0488748f, 0.0642388f, -0.0383848f, 0.0135046f, -0.0413592f,
--0.0326402f, -0.0137421f, -0.0225219f, -0.0917294f, -0.277759f,
--0.185418f, 0.0471128f, -0.125879f, 0.262467f, -0.212794f,
--0.112931f, -1.99885f, -0.404787f, 0.224402f, 0.637962f,
--0.27808f, -0.0723953f, -0.0537655f, -0.0336359f, -0.0906601f,
--0.0641309f, -0.0713542f, 0.0524317f, 0.00608819f, 0.0754101f,
--0.0488401f, -0.00671865f, 0.0418239f, 0.0536284f, -0.132639f,
-0.0267648f, -0.248432f, -0.0104153f, 0.035544f, -0.212753f,
--0.302895f, -0.0357854f, 0.376838f, 0.597025f, -0.664647f,
-0.268422f, -0.376772f, -1.05472f, 0.0144178f, 0.179122f,
-0.0360155f, 0.220262f, -0.0056381f, 0.0317197f, 0.0621066f,
--0.00779298f, 0.00789378f, 0.00350605f, 0.0104809f, 0.0362871f,
--0.157708f, -0.0659779f, -0.0926278f, 0.00770791f, 0.0631621f,
-0.0817343f, -0.424295f, -0.0437727f, -0.24251f, 0.711217f,
--0.736455f, -2.194f, -0.107612f, -0.175156f, -0.0366573f,
--0.0123156f, -0.0628516f, -0.0218977f, -0.00693699f, 0.00695185f,
-0.00507362f, 0.00359334f, 0.0052661f, 0.035561f, 0.0382701f,
-0.0342179f, -0.00790271f, -0.0170925f, 0.047029f, 0.0197362f,
--0.0153435f, 0.0644152f, -0.36862f, -0.0674876f, -2.82672f,
-1.34122f, -0.0788029f, -3.47792f, 0.507246f, -0.816378f,
--0.0142383f, -0.127349f, -0.106926f, -0.0359524f, 0.105045f,
-0.291554f, 0.195413f, 0.0866214f, -0.066577f, -0.102188f,
-0.0979466f, -0.12982f, 0.400181f, -0.409336f, -0.0593326f,
--0.0656203f, -0.204474f, 0.179802f, 0.000509084f, 0.0995954f,
--2.377f, -0.686359f, 0.934861f, 1.10261f, 1.3901f,
--4.33616f, -0.00264017f, 0.00713045f, 0.106264f, 0.143726f,
--0.0685305f, -0.054656f, -0.0176725f, -0.0772669f, -0.0264526f,
--0.0103824f, -0.0269872f, -0.00687f, 0.225804f, 0.407751f,
--0.0612611f, -0.0576863f, -0.180131f, -0.222772f, -0.461742f,
-0.335236f, 1.03399f, 4.24112f, -0.345796f, -0.594549f,
--76.1407f, -0.265276f, 0.0507719f, 0.0643044f, 0.0384832f,
-0.0424459f, -0.0387817f, -0.0235996f, -0.0740556f, -0.0270029f,
-0.00882177f, -0.0552371f, -0.00485851f, 0.314295f, 0.360431f,
--0.0787085f, 0.110355f, -0.415958f, -0.385088f, -0.272224f,
--1.55108f, -0.141848f, 0.448877f, -0.563447f, -2.31403f,
--0.120077f, -1.49918f, -0.817726f, -0.0495854f, -0.0230782f,
--0.0224014f, 0.117076f, 0.0393216f, 0.051997f, 0.0330763f,
--0.110796f, 0.0211117f, -0.0197258f, 0.0187461f, 0.0125183f,
-0.14876f, 0.0920565f, -0.342475f, 0.135272f, -0.168155f,
--0.033423f, -0.0604611f, -0.128835f, 0.664947f, -0.144997f,
-2.27649f, 1.28663f, 0.841217f, -2.42807f, 0.0230471f,
-0.226709f, -0.0374803f, 0.155436f, 0.0400342f, -0.184686f,
-0.128488f, -0.0939518f, -0.0578559f, 0.0265967f, -0.0999322f,
--0.0322768f, -0.322994f, -0.189371f, -0.738069f, -0.0754914f,
-0.214717f, -0.093728f, -0.695741f, 0.0899298f, -2.06188f,
--0.273719f, -0.896977f, 0.130553f, 0.134638f, 1.29355f,
-0.00520749f, -0.0324224f, 0.00530451f, 0.0192385f, 0.00328708f,
-0.0250838f, 0.0053365f, -0.0177321f, 0.00618789f, 0.00525364f,
-0.00104596f, -0.0360459f, 0.0402403f, -0.0406351f, 0.0136883f,
-0.0880722f, -0.0197449f, 0.089938f, 0.0100456f, -0.0475638f,
--0.73267f, 0.037433f, -0.146551f, -0.230221f, -3.06489f,
--1.40194f, 0.0198483f, 0.0397953f, -0.0190239f, 0.0470715f,
--0.131363f, -0.191721f, -0.0176224f, -0.0480352f, -0.221799f,
--0.26794f, -0.0292615f, 0.0612127f, -0.129877f, 0.00628332f,
--0.085918f, 0.0175379f, 0.0541011f, -0.0810874f, -0.380809f,
--0.222056f, -0.508859f, -0.473369f, 0.484958f, -2.28411f,
-0.0139516f,
-/* output layer */
-3.90017f, 1.71789f, -1.43372f, -2.70839f, 1.77107f,
-5.48006f, 1.44661f, 2.01134f, -1.88383f, -3.64958f,
--1.26351f, 0.779421f, 2.11357f, 3.10409f, 1.68846f,
--4.46197f, -1.61455f, 3.59832f, 2.43531f, -1.26458f,
-0.417941f, 1.47437f, 2.16635f, -1.909f, -0.828869f,
-1.38805f, -2.67975f, -0.110044f, 1.95596f, 0.697931f,
--0.313226f, -0.889315f, 0.283236f, 0.946102f, };
+const DenseLayer layer0 = {
+ layer0_bias,
+ layer0_weights,
+ 25, 16, 0
+};
-static const int topo[3] = {25, 16, 2};
+const GRULayer layer1 = {
+ layer1_bias,
+ layer1_weights,
+ layer1_recur_weights,
+ 16, 12
+};
-const MLP net = {
- 3,
- topo,
- weights
+const DenseLayer layer2 = {
+ layer2_bias,
+ layer2_weights,
+ 12, 2, 1
};
+