Code Monkey home page Code Monkey logo

fcnn's Introduction

Fully Connected Neural Network

Fully Connected Neural Network implementation on C.

Please see main.c to set the settings of network.

Getting Started

Build (all):
  make
  
Build (only network):
  make main
  
Build (only tests):
  make unittest

To build this code on VS just create new project and put them to it.

For VS 2015 it's needed to rename *.c to *.cpp

Source code description

  AnnStatus ann_create(size_t max_layers, Ann ** pp_ann);
  Brief: Create artificial neural network.
  Input:
    max_layers - Maximum number of layers.
    pp_ann - Pointer to a variable to fill with new ANN pointer.
  Output:
    *pp_ann - Should contain a pointer to a newly created ANN.
  
  AnnStatus ann_add(Ann * p_ann, size_t num_input, size_t num_output, const float * p_weight, const float * p_bias);
  Brief: Add layer and copy layer data into internal structures.
  Input:
    p_ann - ANN pointer.
    num_input - Number of elements in input vector
    num_output - Number of elements in output vector
    p_weight - Weight matrix of size 'num_output' x 'num_input'.
    So it has 'num_output' rows and 'num_input' columns.
    Data is stored continuosly:
    W11, W12, ... W1n,
    W21, W22, ... W2n,
    ...
    Wm1, Wm2, ... Wmn
    where m = num_output and n = num_input
    p_bias - Bias vector. It has 'num_output' elements.
  Output:
    <none>

  AnnStatus ann_forward(Ann * p_ann, size_t num_input, size_t num_output, const float * p_input, float * p_output);
  Brief: Perform 'forward' operation.
  Input:
    p_ann - ANN pointer.
    num_input - Number of elements in input vector
    num_output - Number of elements in output vector
    p_input - Input vector
    p_output - Output vector
  Output:
    *p_output - should be filled with result of forward operation

  void ann_release(Ann ** pp_ann);
   /* Brief: Destroy ANN and free all buffers.
  Input:
    pp_ann - A pointer to ANN pointer.
  Output:
    *pp_ann should be freed if non-null.
    *pp_ann should be set to null.

fcnn's People

Contributors

vvasily avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.