nixers
Rewrite of urnn in pure C - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Development & Graphics (https://nixers.net/Forum-Development-Graphics)
+--- Forum: Programming On Unix (https://nixers.net/Forum-Programming-On-Unix)
+--- Thread: Rewrite of urnn in pure C (/Thread-Rewrite-of-urnn-in-pure-C)


Rewrite of urnn in pure C - pizzaroll1 - 06-09-2017

I wanted to use urnn, it worked well enough, however I was dissatisfied with the hackiness of the scripts. Obviously neeasade had the same idea since there is a C branch of the urnn repo with hints of a complete rewrite.

Anyway, it wasn't too difficult to write it from scratch, here is my attempt. I benefited greatly from the efforts put in by venam, neeasade and others to gather training data and I learnt from the design of urnn.

I haven't put any time into checking for leaks, static analysis, testing on any machine other than my laptop etc, so there's probably a lot I could improve on. I might also move it to git.nixers.net if there are any big features people want to add, but the scope of the tool seems fairly small, I don't think there's anything big that needs doing.

I would very much appreciate any comments or contributions.


RE: Rewrite of urnn in pure C - venam - 06-09-2017

(06-09-2017, 11:51 AM)pizzaroll1 Wrote: I wanted to use urnn, it worked well enough, however I was dissatisfied with the hackiness of the scripts. Obviously neeasade had the same idea since there is a C branch of the urnn repo with hints of a complete rewrite.
Which script exactly are you disatisfied with? They are all fairly straight forward Perl scripts and do one thing while accepting input from stdin.

Yes, neeasade was working on a C port of the repo.

(06-09-2017, 11:51 AM)pizzaroll1 Wrote: I benefited greatly from the efforts put in by venam, neeasade and others to gather training data and I learnt from the design of urnn.
Cool, I hope you learned a lot. It was a fun project to put together.

On a side note I've added a second license, a BSD one.


RE: Rewrite of urnn in pure C - pizzaroll1 - 06-09-2017

It's nothing specific, it's just that the FANN library, as of the latest version 2.2.0 at least, lets you create and manipulate training data structs directly, without any need to write any intermediate files to disk. All this string processing seems unnecessary when you already have the data in-memory, it's just that one needs to do a little fiddling around to hook it up to the neural network in the right way.

Also you can actually use int as fann_type, but I don't see a pressing need for it. The code might be cleaner I guess.