We propose a novel approach for posterior sampling with intractablelikelihoods. This is an increasingly important problem in scientificapplications where models are implemented as sophisticated computersimulations. As a result, tractable densities are not available, which forcespractitioners to rely on approximations during inference. We address theintractability of densities by training a parameterized classifier whose outputis used to approximate likelihood ratios between arbitrary model parameters. Inturn, we are able to draw posterior samples by plugging this approximator intocommon Markov chain Monte Carlo samplers such as Metropolis-Hastings andHamiltonian Monte Carlo. We demonstrate the proposed technique by fitting thegenerating parameters of implicit models, ranging from a linear probabilisticmodel to settings in high energy physics with high-dimensional observations.Finally, we discuss several diagnostics to assess the quality of the posterior.