Skip to content

allenact.algorithms.onpolicy_sync.losses.a2cacktr#

[view_source]

Implementation of A2C and ACKTR losses.

A2CACKTR#

class A2CACKTR(AbstractActorCriticLoss)

[view_source]

Class implementing A2C and ACKTR losses.

Attributes

  • acktr: True if should use ACKTR loss (currently not supported), otherwise uses A2C loss.
  • value_loss_coef: Weight of value loss.
  • entropy_coef: Weight of entropy (encouraging) loss.
  • entropy_method_name: Name of Distr's entropy method name. Default is entropy, but we might use conditional_entropy for SequentialDistr.

A2CACKTR.__init__#

 | __init__(value_loss_coef, entropy_coef, acktr=False, entropy_method_name: str = "entropy", *args, **kwargs, *, ,)

[view_source]

Initializer.

See class documentation for parameter definitions.

A2C#

class A2C(A2CACKTR)

[view_source]

A2C Loss.

ACKTR#

class ACKTR(A2CACKTR)

[view_source]

ACKTR Loss.

This code is not supported as it currently lacks an implementation for recurrent models.