d3rlpy.q_functions.FQFQFunctionFactory

class d3rlpy.q_functions.FQFQFunctionFactory(n_quantiles=32, embed_size=64, entropy_coeff=0.0)[source]

Fully parameterized Quantile Function Q function factory.

References

Parameters:
  • n_quantiles (int) – the number of quantiles.
  • embed_size (int) – the embedding size.
  • entropy_coeff (float) – the coefficiency of entropy penalty term.
n_quantiles

the number of quantiles.

Type:int
embed_size

the embedding size.

Type:int
entropy_coeff

the coefficiency of entropy penalty term.

Type:float

Methods

create(encoder, action_size=None)[source]

Returns PyTorch’s Q function module.

Parameters:
  • encoder (torch.nn.Module) – an encoder module that processes the observation (and action in continuous action-space) to obtain feature representations.
  • action_size (int) – dimension of discrete action-space. If the action-space is continous, None will be passed.
Returns:

Q function object.

Return type:

torch.nn.Module

get_params(deep=False)[source]

Returns Q function parameters.

Returns:Q function parameters.
Return type:dict
get_type()

Returns Q function type.

Returns:Q function type.
Return type:str

Attributes

TYPE = 'fqf'