提交 01f54ac2 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #1863 from jjh42/doc-pickle-fix

Minor fix to make pickle example more accurate.
......@@ -131,7 +131,7 @@ matrix *W* and a bias *b*, you can define:
.. code-block:: python
def __getstate__(self):
return (W, b)
return (self.W, self.b)
def __setstate__(self, state):
W, b = state
......@@ -145,7 +145,7 @@ functions to reflect the change in name:
.. code-block:: python
def __getstate__(self):
return (weights, bias)
return (self.weights, self.bias)
def __setstate__(self, state):
W, b = state
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论