Git Product home page Git Product logo

crystal-fann's People

Contributors

bararchy avatar gitter-badger avatar hugoabonizio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crystal-fann's Issues

Remove the Crystal namespace

Right now the namespace is quite long, we want to keep the repo and shard name crystal-fann , but we can make it more programmers friendly

# Now
Crystal::Fann::Network::Standard
# After
Fann::Network::Standard

to C

Is possible add a function to generate C program without dependencies?
For example I put data, learn in Crystal, but at end I get one simple finction in C

#define WEIGHTS ....
int result(data *input.....)
{
}

ideal for embeded, no dependencies, no load any file. Only put input and get output

not working

make cr
crystal run ./fa2.cr
F-ann5858T-rainD-ata.o: In function `set_train_struct':
/home/xor256/t1a-fann/lib/crystal-fann/src/crystal-fann/train_data.cr:21: undefined reference to `fann_create_train_pointer_array'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `sqrtf'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `log'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `exp'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `sin'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `pow'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdoublefann.so: undefined reference to `cos'
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o '/home/xor256/.cache/crystal/crystal-run-fa2.tmp'  -rdynamic  -ldoublefann -lpcre /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib`
make: *** [Makefile:5: cr] Błąd 1

fedora 30

trouble with simplest in static mode --release --static

/```
usr/bin/ld: cannot find -ldoublefann (this usually means you need to install the development package for libdoublefann)
/usr/bin/ld: cannot find -lpcre (this usually means you need to install the development package for libpcre)
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: cc "${@}" -o '/home/xor/fa1' -rdynamic -static -ldoublefann -lpcre -lm /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib

Need to add save to file and load from file methods to networks

@hugoabonizio Wana try and tackle this ?

To allow long runs and reuse of the trained network later, we need to add .save and .load options, basically it just uses

fun save = fann_save(ann : Fann*, configuration_file : LibC::Char*) : LibC::Int
fun create_from_file = fann_create_from_file(configuration_file : LibC::Char*) : Fann*

so something along the lines of

def save(path : String) : Int32
  LibFANN.save(@ann, path)
end

and something similar for load, crate_from_file

Change module name from Fann to FANN

Following a suggestion from #4 and using the crystal naming guidelines

Acronyms

In class names, acronyms are all uppercase. For example, HTTP, and LibXML

We should rename the module name to uppercase , so FANN

Something wrong with desired MSE after move to doublefann

After moving to use doublefann so that input parameters can be Float64 we got some bug with the MSE values, running specs shows

........Max epochs     8000. Desired error: -0.0000000000.
Epochs            1. Current error: 0.2504344881. Bit fail 4.
Epochs         1000. Current error: 0.0000258677. Bit fail 0.
Epochs         2000. Current error: 0.0000260366. Bit fail 0.
Epochs         3000. Current error: 0.0000253705. Bit fail 0.
Epochs         4000. Current error: 0.0000244194. Bit fail 0.
Epochs         5000. Current error: 0.0000170922. Bit fail 0.
Epochs         6000. Current error: 0.0000164790. Bit fail 0.
Epochs         7000. Current error: 0.0000157123. Bit fail 0.
Epochs         8000. Current error: 0.0000215559. Bit fail 0.
.Max neurons 500. Desired error: -0.000000

Where relevant parts are:

Desired error: -0.0000000000
Desired error: -0.000000

Those should have used the configured amount of:

0.001
and
0.1

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.