Particle identification in ground-based gamma-ray astronomy using convolutional neural networks