Algorithm to calculate nerual network training time?
The best way to know is to train two epochs. The first epoch often takes longest, because data loading takes place with some caching.

The second epoch will give you an accurate time for each epoch.



Things to help the guesses that you might include in your question:


What are the specifications of p2.xlarge?
Where are your images stored? on the instance EBS storage? s3 storage? A separate file-system?
In which format is your data stored?
Perhaps the number of parameters in the model, but that can also be misleading!