CoolFace
Apppublic

arao02/Desktop

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
NeuralNetworks.cpp18 linesDownload Raw Back to root
1#include <iostream>2#include "MLP.h"3 4int main(){5    srand(time(NULL));6    rand();7 8    cout << "\n\n--------Logic Gate Example--------\n\n";9    Perceptron *p = new Perceptron(2);10    11    p-> set_weights({10,10,-15});12 13    cout << "Gate: "<< endl;14    cout << p-> run ({0,0}) << endl;15    cout << p-> run ({0,1}) << endl;16    cout << p-> run ({1,0}) << endl;17    cout << p-> run ({1,1}) << endl;18}