Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C by neuro.h ( 14 years ago )
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

#define E 2,7182818
#define error 0.0001
#define theta 0.7
/* Количество нейронов в слоях */
#define L1 10
#define L2 10
#define layers_count 3

typedef struct {
 /* Входные сигналы */
 double *in;
 /* Веса нейронов */
 double *w;
 /* Локальное индуцированное поле */
 double summ;
 /* Выход */
 double y;
 /* Градиент */
 double grad;
 /* Количество входных сигналов */
 int in_count;
 /* Порог */
 double w0;
} neuron;

typedef struct {
 /* Матрица нейронов - строка за слой */
 neuron **L;
 /* Количество нейронов в каждом слое */
 int *s;
 /* Количество слоев */
 int n;
} net;

/* Обучающий пример */
typedef struct {
 double x, y;
} example;

 

Revise this Paste

Your Name: Code Language: