Flexible library for creating, training and analyzing artificial neural networks