Understanding Memory Requirements for Deep Learning and Machine Learning