Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 28 2021 14:16
    oprypin closed #12
  • Nov 28 2021 14:16
    oprypin commented #12
  • Nov 28 2021 14:13
    bararchy closed #10
  • Nov 28 2021 14:13
    bararchy commented #12
  • Nov 28 2021 14:12

    bararchy on v1.2.0

    (compare)

  • Nov 28 2021 14:11

    bararchy on master

    sync version (compare)

  • Nov 28 2021 14:10

    bararchy on master

    Fix for Crystal 1.2.2 fix format (compare)

  • Nov 27 2021 12:04
    oprypin commented #12
  • Jan 26 2021 19:49
    oprypin opened #12
  • Oct 24 2019 09:26
    fab1an2 commented #11
  • Oct 23 2019 10:25
    bararchy closed #11
  • Oct 23 2019 09:27
    bararchy commented #11
  • Oct 23 2019 09:23
    bararchy commented #11
  • Oct 23 2019 09:19
    fab1an2 opened #11
  • Sep 21 2019 10:36
    bararchy commented #10
  • Sep 21 2019 10:35
    bararchy commented #10
  • Sep 21 2019 10:34
    bararchy commented #10
  • Sep 21 2019 10:13
    xor256 edited #10
  • Sep 21 2019 10:12
    xor256 opened #10
  • Dec 17 2017 11:41

    bararchy on v1.1.1

    (compare)

Hugo Abonizio
@hugoabonizio
@bararchy thanks for answering!
I was using batch training, like that:
ann.train_batch(data, {:max_runs => 500000, :desired_mse => 0.01_f64, :log_each => 1000})
but changed to single iteration to make it more similar to the neural_net sample I was testing
I think the default activation function is sigmoid (http://leenissen.dk/fann/html/files2/advancedusage-txt.html), but I'm testing others anyway
Bar Hofesh
@bararchy
@hugoabonizio Does using Cascade and batch gives you a better result ?
Hugo Abonizio
@hugoabonizio
I'll try Cascade later and let you know the results!
Bar Hofesh
@bararchy
:thumbsup: thanks
Oh, one more thing, which source did you use to get the FANN lib from ?
Hugo Abonizio
@hugoabonizio
hi @bararchy
I followed this installation http://leenissen.dk/fann/wp/help/installing-fann/ and cloned from github repo
on lib_fann.cr file I was replacing @[Link("doublefann")] with @[Link("fann")] to experiment
with doublefann it's giving 96% accuracy now!
(but sometimes it's 30%, I think that's a problem with the random weights initialization)
I think it's fine now, thanks!
Bar Hofesh
@bararchy
Oh I see XD
well, as we binded against douablefann we changed Float64\Float32 ratio to acompany this :) so using the non double version indeed introduces issues
thanks for the update :) @hugoabonizio
Hugo Abonizio
@hugoabonizio
I didn't thought about that :laughing:
thanks for your help!
Martyn Jago
@mjago
Hi @bararchy The example on github readme seems to fail for me as in I get a result > 0.1 ~ any ideas?
Max epochs     8000. Desired error: 0.0010000000.
Epochs            1. Current error: 0.5189931989. Bit fail 2.
Epochs         1000. Current error: 0.2500000000. Bit fail 4.
Epochs         2000. Current error: 0.2500000000. Bit fail 4.
Epochs         3000. Current error: 0.2500000596. Bit fail 4.
Epochs         4000. Current error: 0.2500000000. Bit fail 4.
Epochs         5000. Current error: 0.2500000000. Bit fail 4.
Epochs         6000. Current error: 0.2500000596. Bit fail 4.
Epochs         7000. Current error: 0.2500000000. Bit fail 4.
Epochs         8000. Current error: 0.2500000596. Bit fail 4.
[0.5000107397550064]
false
Bar Hofesh
@bararchy

@mjago hmmm it seems you get "stuck" at an error rate and not getting out of it.

This could be because of few issues, Have you compiled and used doublefann? did you used the latest version of crystal-fann ?

specs are passing for me on HEAD
does running crystal spec works for you?
Bar Hofesh
@bararchy
Also, a quick question, which of the examples didn't work?
Martyn Jago
@mjago
Specs work
Finished in 71.3 milliseconds
14 examples, 0 failures, 0 errors, 0 pending
I compiled github/libfann head
Bar Hofesh
@bararchy

hm... running specs on master shows

Fann::Network
  initializes
works
Fann::Network
  initializes standard network
  initializes cascade network
  free memory
  trains on single data
  Shows MSE
  trains and evaluate single data
  train on batchMax epochs     8000. Desired error: 0.0010000000.
Epochs            1. Current error: 0.2745950818. Bit fail 2.
Epochs           91. Current error: 0.0009867755. Bit fail 0.
  train on batch
  train on cascadeMax neurons 500. Desired error: 0.001000
Neurons       0. Current error: 0.250000. Total error:  1.0000. Epochs    51. Bit fail   4
Neurons       1. Current error: 0.000746. Total error:  0.0030. Epochs   117. Bit fail   0. candidate steepness 1.00. function FANN_GAUSSIAN_SYMMETRIC
Train outputs    Current error: 0.000000. Epochs    123
  train on cascade

Finished in 3.2 milliseconds
10 examples, 0 failures, 0 errors, 0 pending

So only 10 examples

how did you get 14?
:)
are you using latest version of Crystal-fann?
Martyn Jago
@mjago
:smile:
Ok so I was using a shard to get the error, and cloned your repo to run the specs
Bar Hofesh
@bararchy
Ok, so I'll just make sure again, are you using latest crystal-fann ?
maybe the shard isn't using latest crystal-fann version?
Martyn Jago
@mjago
NeuraLegion/crystal-fann
shard is using that with branch: master

I get this .......Max epochs 8000. Desired error: 0.0010000000.
Epochs 1. Current error: 0.3286948800. Bit fail 2.
Epochs 63. Current error: 0.0009598084. Bit fail 0.
.Max neurons 500. Desired error: 0.001000
Neurons 0. Current error: 0.250000. Total error: 1.0000. Epochs 51. Bit fail 4
Neurons 1. Current error: 0.000618. Total error: 0.0025. Epochs 116. Bit fail 0. candidate steepness 0.25. function FANN_GAUSSIAN_SYMMETRIC
Train outputs Current error: 0.000000. Epochs 120
......

Finished in 79.43 milliseconds
14 examples, 0 failures, 0 errors, 0 pending
Sun Dec 17: crystal-fann/ >
```

I hate gitter sometimes
Bar Hofesh
@bararchy
@mjago You're right, it was my bad, I wans't on latest
can you tell me which of the README examples wont work for you?
basiclly all of them are in the specs, so it's wierd they work there but not in the code
Martyn Jago
@mjago
# Work on array of test data (batch)
Hmm strange - one of the specs failed once (train_data_spec.cr I think) but now all pass - I’ll go and try the example again
Bar Hofesh
@bararchy
Sure, let me know :)
Martyn Jago
@mjago
Still fails yet the first and last example work fine
Perhaps its the crystal version ?
Crystal 0.24.1+5 [a1e90f0bd] (2017-12-16)

LLVM: 4.0.0
Default target: x86_64-apple-macosx
Bar Hofesh
@bararchy
I'm also on Head
I'm on Linux hough