TherML: Thermodynamics of Machine Learning