Accurate subfilter stress modeling aids in increasing the accuracy of large-eddy simulations. A two neural network architecture for subfilter stress modeling is proposed for its magnitude and tensor structure based on a tensor basis expansion of the subfilter stress tensor. Due to the fully convolutional structure of the neural networks, they are trained on varying filter widths and varying domain sizes with a physics-informed loss function that enforces dissipation directly while allowing for backscatter. This structure is first evaluated a priori for forced homogeneous isotropic turbulence and channel flow conditions, where it is demonstrated that the neural networks can accurately predict the subfilter stress even in domains where, on average, over 20% of the kinetic energy (as compared to direct numerical simulation) is filtered out. The two neural network architecture is also analyzed in a posteriori settings for both forced homogeneous isotropic turbulence and channel flow conditions without clipping, where it is found that the model improves turbulent space-time correlations for forced homogeneous isotropic turbulence and mean velocity profiles for channel flow. In addition, the neural network provides reasonable results in simulations at Reynolds numbers over 30 times the Reynolds numbers in the training set. locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon locked icon Physics Subject Headings (PhySH)TurbulenceTurbulence modelingConvolutional neural networksDeep learningLarge eddy simulationsMachine learning