Fundamentals of Deep Models