nnrl/nn/model/stochastic/ensemble.py
def sample(self, params: List[TensorDict]) -> List[SampleLogp]:
        """Compute samples and likelihoods for each model in the ensemble.

        Args:
            obs: List of `N` observation tensors of shape `(*,) + O`
            action: List of `N` action tensors of shape `(*,) + A`
            sample_shape: Sample shape argument for each model in the ensemble

        Returns:
           List of `N` tuples of sample and log-likelihood tensors of shape
           `S + (*,) + O` and `S + (*,)` respectively, where `S` is the
           `sample_shape`.
        """
        return [m.sample(params[i]) for i, m in enumerate(self)]
Compute samples and likelihoods for each model in the ensemble.

        Args:
            obs: List of `N` observation tensors of shape `(*,) + O`
            action: List of `N` action tensors of shape `(*,) + A`
            sample_shape: Sample shape argument for each model in the ensemble

        Returns:
           List of `N` tuples of sample and log-likelihood tensors of shape
           `S + (*,) + O` and `S + (*,)` respectively, where `S` is the
           `sample_shape`.
        
Compute samples and likelihoods for each model in the ensemble.
Compute samples and likelihoods for each model in the ensemble .
def sample(self, params: List[TensorDict]) -> List[SampleLogp]:
        return [m.sample(params[i]) for i, m in enumerate(self)]
def sample ( self , params : List [ TensorDict ] ) -> List [ SampleLogp ] : return [ m . sample ( params [ i ] ) for i , m in enumerate ( self ) ]
Compute samples and likelihoods for each model in the ensemble.
Compute samples and likelihoods for each model in the ensemble .
"""Compute samples and likelihoods for each model in the ensemble.

        Args:
            obs: List of `N` observation tensors of shape `(*,) + O`
            action: List of `N` action tensors of shape `(*,) + A`
            sample_shape: Sample shape argument for each model in the ensemble

        Returns:
           List of `N` tuples of sample and log-likelihood tensors of shape
           `S + (*,) + O` and `S + (*,)` respectively, where `S` is the
           `sample_shape`.
        """
List of `N` tuples of sample and log-likelihood tensors of shape
`S + (*,) + O` and `S + (*,)` respectively, where `S` is the
`sample_shape`.
List of ` N ` tuples of sample and log - likelihood tensors of shape ` S + ( * ) + O ` and ` S + ( * ) ` respectively where ` S ` is the ` sample_shape ` .
self
params
List[TensorDict]
obs
List of `N` observation tensors of shape `(*,) + O`
List of ` N ` observation tensors of shape ` ( * ) + O `
action
List of `N` action tensors of shape `(*,) + A`
List of ` N ` action tensors of shape ` ( * ) + A `
sample_shape
Sample shape argument for each model in the ensemble
Sample shape argument for each model in the ensemble