ding.rl_utils.sampler¶
ding.rl_utils.sampler
¶
ArgmaxSampler
¶
Overview
Argmax sampler, return the index of the maximum value
__call__(logit)
¶
Overview
Return the index of the maximum value
Arguments:
- logit (:obj:torch.Tensor): The input tensor
Returns:
- action (:obj:torch.Tensor): The index of the maximum value
MultinomialSampler
¶
Overview
Multinomial sampler, return the index of the sampled value
__call__(logit)
¶
Overview
Return the index of the sampled value
Arguments:
- logit (:obj:torch.Tensor): The input tensor
Returns:
- action (:obj:torch.Tensor): The index of the sampled value
MuSampler
¶
Overview
Mu sampler, return the mu of the input tensor
__call__(logit)
¶
Overview
Return the mu of the input tensor
Arguments:
- logit (:obj:ttorch.Tensor): The input tensor
Returns:
- action (:obj:torch.Tensor): The mu of the input tensor
ReparameterizationSampler
¶
Overview
Reparameterization sampler, return the reparameterized value of the input tensor
__call__(logit)
¶
Overview
Return the reparameterized value of the input tensor
Arguments:
- logit (:obj:ttorch.Tensor): The input tensor
Returns:
- action (:obj:torch.Tensor): The reparameterized value of the input tensor
HybridStochasticSampler
¶
Overview
Hybrid stochastic sampler, return the sampled action type and the reparameterized action args
__call__(logit)
¶
Overview
Return the sampled action type and the reparameterized action args
Arguments:
- logit (:obj:ttorch.Tensor): The input tensor
Returns:
- action (:obj:ttorch.Tensor): The sampled action type and the reparameterized action args
HybridDeterminsticSampler
¶
Overview
Hybrid deterministic sampler, return the argmax action type and the mu action args
__call__(logit)
¶
Overview
Return the argmax action type and the mu action args
Arguments:
- logit (:obj:ttorch.Tensor): The input tensor
Returns:
- action (:obj:ttorch.Tensor): The argmax action type and the mu action args
Full Source Code
../ding/rl_utils/sampler.py