Skip to content

Commit

Permalink
Update docstring on MlpExtractor. Resolves #736 (#774)
Browse files Browse the repository at this point in the history
* Improve docstring on MlpExtractor.

* update changelog.
  • Loading branch information
gianlucadecola authored Feb 15, 2022
1 parent 59bec30 commit 58a9806
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Documentation:
- Added doc on Hugging Face integration (@simoninithomas)
- Added furuta pendulum project to project list (@armandpl)
- Fix indentation 2 spaces to 4 spaces in custom env documentation example (@Gautam-J)
- Update MlpExtractor docstring (@gianlucadecola)


Release 1.4.0 (2022-01-18)
Expand Down Expand Up @@ -919,4 +920,4 @@ And all the contributors:
@benblack769 @bstee615 @c-rizz @skandermoalla @MihaiAnca13 @davidblom603 @ayeright @cyprienc
@wkirgsn @AechPro @CUN-bjy @batu @IljaAvadiev @timokau @kachayev @cleversonahum
@eleurent @ac-93 @cove9988 @theDebugger811 @hsuehch @Demetrio92 @thomasgubler @IperGiove @ScheiklP
@simoninithomas @armandpl @manuel-delverme @Gautam-J
@simoninithomas @armandpl @manuel-delverme @Gautam-J @gianlucadecola
6 changes: 4 additions & 2 deletions stable_baselines3/common/torch_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ def create_mlp(

class MlpExtractor(nn.Module):
"""
Constructs an MLP that receives observations as an input and outputs a latent representation for the policy and
a value network. The ``net_arch`` parameter allows to specify the amount and size of the hidden layers and how many
Constructs an MLP that receives the output from a previous feature extractor (i.e. a CNN) or directly
the observations (if no feature extractor is applied) as an input and outputs a latent representation
for the policy and a value network.
The ``net_arch`` parameter allows to specify the amount and size of the hidden layers and how many
of them are shared between the policy network and the value network. It is assumed to be a list with the following
structure:
Expand Down

0 comments on commit 58a9806

Please sign in to comment.