This commit is contained in:
Trinkle23897 2020-04-10 11:16:33 +08:00
parent 3cc22b7c0c
commit ecfcb9f295
3 changed files with 4 additions and 4 deletions

View File

@ -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::

View File

@ -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

View File

@ -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')