class_docstr: A class that knows how to compute the likelihood of some data.
class_docstr_tok: ["A","class","that","knows","how","to","compute","the","likelihood","of","some","data","."]
docstr: Sample from the likelihood.
docstr_tok: ["Sample","from","the","likelihood","."]
code: def sample(
      self, params, nn_out, seed, sample_shape=None
  ) -> jax.Array:
      """Sample from the likelihood."""
      return self.dist(params, nn_out).sample(
          seed=seed, sample_shape=sample_shape
      )
  
imports: import dataclasses
  from typing import Any
  import jax
  from tensorflow_probability.substrates.jax.bijectors import softplus
  from tensorflow_probability.substrates.jax.distributions import distribution
  from tensorflow_probability.substrates.jax.distributions import inflated
  from tensorflow_probability.substrates.jax.distributions import logistic
  from tensorflow_probability.substrates.jax.distributions import lognormal
  from tensorflow_probability.substrates.jax.distributions import negative_binomial
  from tensorflow_probability.substrates.jax.distributions import normal
  from tensorflow_probability.substrates.jax.distributions import transformed_distribution
label_desc: Use image node_id 2 for calling the LikelihoodModel obj's underlying member method code with example usage: obj.sample(params, nn_out, seed, sample_shape) and returns: self