Skip to content

Commit

Permalink
Typos in the doc (openai#160)
Browse files Browse the repository at this point in the history
* Typo fix

* Update doc (typos + clarify custom policy)

* Correct typo in the custom policy example
  • Loading branch information
mrakgr authored and araffin committed Jan 13, 2019
1 parent 204a66d commit 002fb35
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/guide/custom_env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can find a `complete guide online <https://github.com/openai/gym/tree/master
on creating a custom Gym environment.


Optionnaly, you can also register the environment with gym,
Optionally, you can also register the environment with gym,
that will allow you to create the RL agent in one line (and use ``gym.make()`` to instantiate the env).


Expand Down
8 changes: 5 additions & 3 deletions docs/guide/custom_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ However, you can also easily define a custom architecture for the policy (or val
model = A2C(CustomPolicy, env, verbose=1)
# Train the agent
model.learn(total_timesteps=100000)
# Save the agent
model.save("a2c-lunar")
del model
# When loading a model with a custom policy
# you MUST pass explicitly the policy when loading the saved model
model = A2C.load(policy=CustomPolicy)
model = A2C.load("a2c-lunar", policy=CustomPolicy)
.. warning::

When loading a model with a custom policy, you must pass the custom policy explicitly when loading the model. (cf previous example)


You can also registered your policy, to help with code simplicity: you can refer to your custom policy using a string.
You can also register your policy, to help with code simplicity: you can refer to your custom policy using a string.

.. code-block:: python
Expand Down Expand Up @@ -164,7 +166,7 @@ If your task requires even more granular control over the policy architecture, y
with tf.variable_scope("model", reuse=reuse):
activ = tf.nn.relu
extracted_features = nature_cnn(self.self.processed_obs, **kwargs)
extracted_features = nature_cnn(self.processed_obs, **kwargs)
extracted_features = tf.layers.flatten(extracted_features)
pi_h = extracted_features
Expand Down
2 changes: 1 addition & 1 deletion docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ Contributors (since v2.0.0):
In random order...

Thanks to @bjmuld @iambenzo @iandanforth @r7vme @brendenpetersen @huvar @abhiskk @JohannesAck
@EliasHasle
@EliasHasle @mrakgr @Bleyddyn
2 changes: 1 addition & 1 deletion docs/modules/a2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/acer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/acktr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ddpg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Notes
Can I use?
----------

- Reccurent policies: ❌
- Recurrent policies: ❌
- Multi processing: ❌
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/dqn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Notes
Can I use?
----------

- Reccurent policies: ❌
- Recurrent policies: ❌
- Multi processing: ❌
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/gail.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Thanks to the open source:
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️ (using MPI)
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ppo1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️ (using MPI)
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ppo2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/sac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Notes
Can I use?
----------

- Reccurent policies: ❌
- Recurrent policies: ❌
- Multi processing: ❌
- Gym spaces:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/trpo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Notes
Can I use?
----------

- Reccurent policies: ✔️
- Recurrent policies: ✔️
- Multi processing: ✔️ (using MPI)
- Gym spaces:

Expand Down

0 comments on commit 002fb35

Please sign in to comment.