Training a convolutional neural network to recognize star formation activity from simulated galaxy images