Hierarchical training of neural networks and prediction of chaotic time series