File size: 414 Bytes
d31f709
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "MLPLibrary.h"

MLPLibrary mlp(2, 4, 1, 0.1); 

void setup() {
  // put your setup code here, to run once:
  mlp.initialilze();
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  float input[2] = {0.5, 0.3};
  float target[1] = {0.7};

  mlp.train(input, target);

  float output[1];
  mlp.predict(input, output);
  Serial.println(output[1]);
}