You could store the number of correctly predicted samples during training and divide it by the total number of samples after each epoch is done.
Also, the ImageNet example 6 uses some utility classes to track the losses and accuracy, which might be useful for your use case.