AbstractDeep neural networks (DNNs) are developed from a data set obtained from the dynamic Smagorinsky model to emulate the subgrid‐scale (SGS) viscosity (νsgs) and diffusivity (κsgs) for turbulent stratified shear flows encountered in the oceans and the atmosphere. These DNNs predict νsgs and κsgs from velocities, strain rates, and density gradients such that the evolution of the kinetic energy budget and density variance budget terms is similar to the corresponding values obtained from the original dynamic Smagorinsky model. These DNNs also compute νsgs and κsgs ∼2–4 times quicker than the dynamic Smagorinsky model resulting in a ∼2–2.5 times acceleration of the entire simulation. This study demonstrates the feasibility of deep learning in emulating the subgrid‐scale (SGS) phenomenon in geophysical flows accurately in a cost‐effective manner. In a broader perspective, deep learning‐based surrogate models can present a promising alternative to the traditional parameterizations of the subgrid‐scale processes in climate models.