On-line Learning in Multilayer Networks