Skip to content

Commit

Permalink
Add a note about custom class vs policy kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
araffin committed Jan 17, 2019
1 parent 1640f74 commit 3fec9eb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/guide/custom_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Custom Policy Network
Stable baselines provides default policy networks (see :ref:`Policies <policies>` ) for images (CNNPolicies)
and other type of input features (MlpPolicies).

One way of customising the policy network architecture is to pass argument using ``policy_kwargs`` parameter:
One way of customising the policy network architecture is to pass arguments when creating the model,
using ``policy_kwargs`` parameter:

.. code-block:: python
Expand All @@ -33,6 +34,13 @@ One way of customising the policy network architecture is to pass argument using
You can also easily define a custom architecture for the policy (or value) network:

.. note::

Defining a custom policy class is equivalent to passing ``policy_kwargs``. However,
it lets you name the policy and so makes usually the code clearer. ``policy_kwargs`` should be rather used
when doing hyperparameter search.


.. code-block:: python
import gym
Expand Down

0 comments on commit 3fec9eb

Please sign in to comment.