Heavy flavor discrimination by neural networks