def eg_bn_model_factory(request):
GradientEstimator = request.param<EOL>def eg_bn_model():<EOL><INDENT>cm_model = contextmanager(bn_model)<EOL>with cm_model() as model:<EOL><INDENT>gradient_estimator = GradientEstimator(epsilon=<NUM_LIT>)<EOL>model = ModelWithEstimatedGradients(model, gradient_estimator)<EOL>yield model<EOL><DEDENT><DEDENT>return eg_bn_model<EOL>
Same as bn_model but with estimated gradient.