Skip to content

Commit

Permalink
fix: updated blank lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
PommesPeter committed Aug 10, 2023
1 parent 7f43f82 commit 5547c94
Show file tree
Hide file tree
Showing 4 changed files with 732 additions and 721 deletions.
2 changes: 2 additions & 0 deletions python/paddle/optimizer/adadelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Adadelta(Optimizer):
>>> import paddle
>>> paddle.seed(2023)
>>> inp = paddle.uniform([10, 10], dtype="float32", min=-0.1, max=0.1)
>>> linear = paddle.nn.Linear(10, 10)
>>> out = linear(inp)
Expand All @@ -82,6 +83,7 @@ class Adadelta(Optimizer):
>>> back = out.backward()
>>> adadelta.step()
>>> adadelta.clear_grad()
>>> # Note that the learning_rate of linear_2 is 0.01.
>>> linear_1 = paddle.nn.Linear(10, 10)
>>> linear_2 = paddle.nn.Linear(10, 10)
Expand Down
2 changes: 2 additions & 0 deletions python/paddle/optimizer/adagrad.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Adagrad(Optimizer):
>>> import paddle
>>> paddle.seed(2023)
>>> inp = paddle.rand(shape=[10, 10])
>>> linear = paddle.nn.Linear(10, 10)
>>> out = linear(inp)
Expand All @@ -81,6 +82,7 @@ class Adagrad(Optimizer):
>>> out.backward()
>>> adagrad.step()
>>> adagrad.clear_grad()
>>> # Note that the learning_rate of linear_2 is 0.01.
>>> linear_1 = paddle.nn.Linear(10, 10)
>>> linear_2 = paddle.nn.Linear(10, 10)
Expand Down
2 changes: 2 additions & 0 deletions python/paddle/optimizer/adam.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class Adam(Optimizer):
>>> import paddle
>>> paddle.seed(2023)
>>> linear = paddle.nn.Linear(10, 10)
>>> inp = paddle.rand([10,10], dtype="float32")
>>> out = linear(inp)
Expand All @@ -116,6 +117,7 @@ class Adam(Optimizer):
>>> # Adam with beta1/beta2 as Tensor and weight_decay as float
>>> import paddle
>>> paddle.seed(2023)
>>> linear = paddle.nn.Linear(10, 10)
>>> inp = paddle.rand([10,10], dtype="float32")
>>> out = linear(inp)
Expand Down
Loading

0 comments on commit 5547c94

Please sign in to comment.