Skip to content

Commit

Permalink
fix: docs (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxiangzhuang authored Sep 19, 2023
1 parent 1a3a880 commit 6c3e690
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Binary Classification with MLP

??? MLPBinaryClassifyModel
??? "MLPBinaryClassifyModel"

```python
from toydl.core.optim import SGD
Expand Down
5 changes: 1 addition & 4 deletions toydl/core/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class Module:
Modules form a tree that store parameters and other submodules.
They make up the basis of neural network stacks.
Attributes:
_modules (dict): Storage of the child modules, mapping names to :class:`Module` objects.
_parameters (dict): Storage of the module's parameters, mapping names to :class:`Parameter` objects.
training (bool): Whether the module is in training mode or evaluation mode.
"""

def __init__(self):
Expand Down Expand Up @@ -145,6 +141,7 @@ def update(self, x: Any):
??? warning
注意这里在`update`方法也调用了`self.value.requires_grad_(True)`方法来
确保参数更新后依然是叶子节点,保证可以累计梯度计算并进行参数更新
:param x: the parameter's new value
"""
Expand Down

0 comments on commit 6c3e690

Please sign in to comment.