A compositional approach using Keras for neural networks in real-time systems