d3rlpy.optimizers.WarmupSchedulerFactory

class d3rlpy.optimizers.WarmupSchedulerFactory(warmup_steps)[source]

A warmup learning rate scheduler.

\[lr = \max((t + 1) / warmup\_steps, 1)\]
Parameters:

warmup_steps (int) – Warmup steps.

Methods

create(optim)[source]

Returns a learning rate scheduler object.

Parameters:

optim (Optimizer) – PyTorch optimizer.

Returns:

Learning rate scheduler.

Return type:

LRScheduler

classmethod deserialize(serialized_config)
Parameters:

serialized_config (str) –

Return type:

TConfig

classmethod deserialize_from_dict(dict_config)
Parameters:

dict_config (dict[str, Any]) –

Return type:

TConfig

classmethod deserialize_from_file(path)
Parameters:

path (str) –

Return type:

TConfig

classmethod from_dict(kvs, *, infer_missing=False)
Parameters:

kvs (Optional[Union[dict, list, str, int, float, bool]]) –

Return type:

A

classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)
Parameters:

s (Union[str, bytes, bytearray]) –

Return type:

A

static get_type()[source]
Return type:

str

classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Parameters:
  • infer_missing (bool) –

  • many (bool) –

  • partial (bool) –

Return type:

SchemaF[A]

serialize()
Return type:

str

serialize_to_dict()
Return type:

dict[str, Any]

to_dict(encode_json=False)
Return type:

Dict[str, Optional[Union[dict, list, str, int, float, bool]]]

to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)
Parameters:
Return type:

str

Attributes

warmup_steps: int