Identification of cosmic ray electrons and positrons by neural networks