C++ Neural Networks and Fuzzy Logic: Preface



Download 1,14 Mb.
Pdf ko'rish
bet270/443
Sana29.12.2021
Hajmi1,14 Mb.
#77367
1   ...   266   267   268   269   270   271   272   273   ...   443
Bog'liq
C neural networks and fuzzy logic

Listing 13.1 layer.h file updated to include noise and momentum

// layer.h            V.Rao, H. Rao

C++ Neural Networks and Fuzzy Logic:Preface

Adding Noise During Training

268



// header file for the layer class hierarchy and

// the network class

 // added noise and momentum

#define MAX_LAYERS    5

#define MAX_VECTORS   100

class network;

class Kohonen_network;

class layer

{

protected:



       int num_inputs;

       int num_outputs;

       float *outputs; // pointer to array of outputs

       float *inputs;  // pointer to array of inputs, which

                                      // are outputs of some other layer

       friend network;

       friend Kohonen_network;  // update for Kohonen model

public:


       virtual void calc_out()=0;

};

class input_layer: public layer



{

private:


float noise_factor;

float * orig_outputs;

public:

       input_layer(int, int);

       ~input_layer();

       virtual void calc_out();

       void set_NF(float);

       friend network;

};

class middle_layer;



class output_layer:  public layer

{

protected:



       float * weights;

       float * output_errors; // array of errors at output

       float * back_errors;   // array of errors back−propagated

       float * expected_values;        // to inputs

       float * cum_deltas;    // for momentum

       float * past_deltas;   // for momentum

       friend network;

C++ Neural Networks and Fuzzy Logic:Preface

Adding Noise During Training

269



public:

       output_layer(int, int);

       ~output_layer();

       virtual void calc_out();

       void calc_error(float &);

       void randomize_weights();

       void update_weights(const float, const float);

       void update_momentum();

       void list_weights();

       void write_weights(int, FILE *);

       void read_weights(int, FILE *);

       void list_errors();

       void list_outputs();

};

class middle_layer:   public output_layer



{

private:


public:

    middle_layer(int, int);

    ~middle_layer();

       void calc_error();

};

class network



{

private:


layer *layer_ptr[MAX_LAYERS];

    int number_of_layers;

    int layer_size[MAX_LAYERS];

    float *buffer;

    fpos_t position;

    unsigned training;

public:

    network();

    ~network();

               void set_training(const unsigned &);

               unsigned get_training_value();

               void get_layer_info();

               void set_up_network();

               void randomize_weights();

               void update_weights(const float, const float);

               void update_momentum();

               void write_weights(FILE *);

               void read_weights(FILE *);

               void list_weights();

               void write_outputs(FILE *);

               void list_outputs();

               void list_errors();

               void forward_prop();

               void backward_prop(float &);

               int fill_IObuffer(FILE *);

               void set_up_pattern(int);

               void set_NF(float);

C++ Neural Networks and Fuzzy Logic:Preface

Adding Noise During Training

270



};

Previous Table of Contents Next

Copyright ©

 IDG Books Worldwide, Inc.

C++ Neural Networks and Fuzzy Logic:Preface

Adding Noise During Training

271




Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   266   267   268   269   270   271   272   273   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish