public override void Predict() { //Normalise Input Normalise(X, Xmean, Xstd, Y); //Process Gating Network for (int i = 0; i < ControlNeurons.Length; i++) { BX.SetValue(i, 0, Y.GetValue(ControlNeurons[i], 0)); } ELU(Layer(BX, BW0, Bb0, BY)); ELU(Layer(BY, BW1, Bb1, BY)); SoftMax(Layer(BY, BW2, Bb2, BY)); //Generate Network Weights W0.SetZero(); b0.SetZero(); W1.SetZero(); b1.SetZero(); W2.SetZero(); b2.SetZero(); for (int i = 0; i < YDimBlend; i++) { float weight = BY.GetValue(i, 0); Blend(W0, CW[6 * i + 0], weight); Blend(b0, CW[6 * i + 1], weight); Blend(W1, CW[6 * i + 2], weight); Blend(b1, CW[6 * i + 3], weight); Blend(W2, CW[6 * i + 4], weight); Blend(b2, CW[6 * i + 5], weight); } //Process Motion-Prediction Network ELU(Layer(Y, W0, b0, Y)); ELU(Layer(Y, W1, b1, Y)); Layer(Y, W2, b2, Y); //Renormalise Output Renormalise(Y, Ymean, Ystd, Y); }