Approximating exponential family models (not single distributions) with a two-network architecture