d3rlpy.models.q_functions.MeanQFunctionFactory

class d3rlpy.models.q_functions.MeanQFunctionFactory(bootstrap=False, share_encoder=False)[source]

Standard Q function factory class.

This is the standard Q function factory class.

References

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

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

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.mean_q_function.ContinuousMeanQFunction

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.mean_q_function.DiscreteMeanQFunction

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] = 'mean'
bootstrap
share_encoder