d3rlpy.models.q_functions.IQNQFunctionFactory

class d3rlpy.models.q_functions.IQNQFunctionFactory(bootstrap=False, share_encoder=False, n_quantiles=64, n_greedy_quantiles=32, embed_size=64)[source]

Implicit Quantile Network Q function factory class.

References

Parameters
  • bootstrap (bool) – flag to bootstrap Q functions.

  • share_encoder (bool) – flag to share encoder over multiple Q functions.

  • n_quantiles (int) – the number of quantiles.

  • n_greedy_quantiles (int) – the number of quantiles for inference.

  • embed_size (int) – the embedding size.

Methods

create_continuous(encoder)[source]

Returns PyTorch’s Q function module.

Parameters

encoder (d3rlpy.models.torch.encoders.EncoderWithAction) – an encoder module that processes the observation and action to obtain feature representations.

Returns

continuous Q function object.

Return type

d3rlpy.models.torch.q_functions.iqn_q_function.ContinuousIQNQFunction

create_discrete(encoder, action_size)[source]

Returns PyTorch’s Q function module.

Parameters
  • encoder (d3rlpy.models.torch.encoders.Encoder) – an encoder module that processes the observation to obtain feature representations.

  • action_size (int) – dimension of discrete action-space.

Returns

discrete Q function object.

Return type

d3rlpy.models.torch.q_functions.iqn_q_function.DiscreteIQNQFunction

get_params(deep=False)[source]

Returns Q function parameters.

Returns

Q function parameters.

Parameters

deep (bool) –

Return type

Dict[str, Any]

get_type()

Returns Q function type.

Returns

Q function type.

Return type

str

Attributes

TYPE: ClassVar[str] = 'iqn'
bootstrap
embed_size
n_greedy_quantiles
n_quantiles
share_encoder