Most ML methods cannot incorporate knowledge about the physics, hard constraints, or domain knowledge associated with the systems in which they operate, impacting performance and precluding deployment in safety-critical settings such as power grids. In this talk, I present one framework for incorporating such knowledge into deep learning specifically, namely through the use of "implicit layers." Implicit layers are neural network layers that can represent complicated implicit functions (such as power grid physics) and whose gradients are computed via the implicit function theorem. I describe applications of this implicit layers framework to electricity demand forecasting, fast power system optimization, and provably robust control.