Base classes for building artificial neural networks.