From ecfcb9f295a8312d701265a0194d8b337e032b9e Mon Sep 17 00:00:00 2001 From: Trinkle23897 <463003665@qq.com> Date: Fri, 10 Apr 2020 11:16:33 +0800 Subject: [PATCH] fix docs --- docs/index.rst | 2 +- docs/tutorials/dqn.rst | 2 +- tianshou/policy/base.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index a5e333e..88320cd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -50,7 +50,7 @@ Tianshou is still under development, you can also check out the documents in sta tutorials/dqn tutorials/concepts - tutorials/tabular + tutorials/trick tutorials/cheatsheet .. toctree:: diff --git a/docs/tutorials/dqn.rst b/docs/tutorials/dqn.rst index 766a3d0..a5d97c8 100644 --- a/docs/tutorials/dqn.rst +++ b/docs/tutorials/dqn.rst @@ -211,7 +211,7 @@ No problem! Tianshou supports user-defined training code. Here is the usage: # train policy with a sampled batch data losses = policy.learn(train_collector.sample(batch_size=64)) -For further usage, you can refer to :doc:`/tutorials/tabular`. +For further usage, you can refer to :doc:`/tutorials/cheatsheet`. .. rubric:: References diff --git a/tianshou/policy/base.py b/tianshou/policy/base.py index 8fbcb78..9b67281 100644 --- a/tianshou/policy/base.py +++ b/tianshou/policy/base.py @@ -30,8 +30,8 @@ class BasePolicy(ABC, nn.Module): the network might be ``(mu, sigma), state`` for Gaussian policy. Since :class:`~tianshou.policy.BasePolicy` inherits ``torch.nn.Module``, - you can operate :class:`~tianshou.policy.BasePolicy` almost the same as - ``torch.nn.Module``, for instance, load and save the model: + you can use :class:`~tianshou.policy.BasePolicy` almost the same as + ``torch.nn.Module``, for instance, loading and saving the model: :: torch.save(policy.state_dict(), 'policy.pth')