Demo entry 6628270

1

   

Submitted by 1 on Jul 03, 2017 at 04:31
Language: C++. Code size: 416 Bytes.

int main(int argc, const char * argv[]) {    
    for (unsigned i = 0; i < 10000; ++i) {        
        vector<float> l2 = sigmoid(dot(X, W, 4, 4, 1 ) );
        vector<float> l2_error = y - l2;        
        vector<float> l2_delta = l2_error * sigmoid_d(l2);        
        vector<float> W_delta = dot(transpose( &X[0], 4, 4 ), l2_delta, 4, 4, 1);       
        W = W + W_delta;
    };
    return 0;
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).