d3rlpy.models.RMSpropFactory

class d3rlpy.models.RMSpropFactory(alpha=0.95, eps=0.01, weight_decay=0.0, momentum=0.0, centered=True)[source]

An alias for RMSprop optimizer.

from d3rlpy.optimizers import RMSpropFactory

factory = RMSpropFactory(weight_decay=1e-4)
Parameters:
  • alpha (float) – smoothing constant.

  • eps (float) – term added to the denominator to improve numerical stability.

  • weight_decay (float) – weight decay (L2 penalty).

  • momentum (float) – momentum factor.

  • centered (bool) – flag to compute the centered RMSProp, the gradient is normalized by an estimation of its variance.

Methods

create(named_modules, lr)[source]

Returns an optimizer object.

Parameters:
  • named_modules (list) – List of tuples of module names and modules.

  • lr (float) – Learning rate.

Returns:

an optimizer object.

Return type:

torch.optim.Optimizer

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

alpha: float = 0.95
centered: bool = True
eps: float = 0.01
momentum: float = 0.0
weight_decay: float = 0.0