Add possibility to save trained network and use saved one for recognition.