Skip to content

Commit 5f4323a

Browse files
committed
fix typos in docs
1 parent dad1d74 commit 5f4323a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ for input_i in dataset:
101101
loss_i.backward()
102102
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
103103
g_config=ConFIG_update(grads) # calculate the conflict-free direction
104-
apply_gradient_vector(network) # set the condlict-free direction to the network
104+
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
105105
optimizer.step()
106106
```
107107

conflictfree/grad_operator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def ConFIG_update_double(
4545
loss_i.backward()
4646
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
4747
g_config=ConFIG_update_double(grads) # calculate the conflict-free direction
48-
apply_gradient_vector(network) # set the condlict-free direction to the network
48+
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
4949
optimizer.step()
5050
```
5151
@@ -119,7 +119,7 @@ def ConFIG_update(
119119
loss_i.backward()
120120
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
121121
g_config=ConFIG_update(grads) # calculate the conflict-free direction
122-
apply_gradient_vector(network) # set the condlict-free direction to the network
122+
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
123123
optimizer.step()
124124
```
125125
"""
@@ -231,7 +231,7 @@ class ConFIGOperator(GradientOperator):
231231
loss_i.backward()
232232
grads.append(get_gradient_vector(network))
233233
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
234-
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
234+
apply_gradient_vector(network,g_config) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
235235
optimizer.step()
236236
```
237237

conflictfree/momentum_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class PseudoMomentumOperator(MomentumOperator):
171171
loss_i.backward()
172172
grads.append(get_gradient_vector(network))
173173
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
174-
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
174+
apply_gradient_vector(network,g_config) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
175175
optimizer.step()
176176
```
177177
"""

docs/start/start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for input_i in dataset:
3636
loss_i.backward()
3737
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
3838
g_config=ConFIG_update(grads) # calculate the conflict-free direction
39-
apply_gradient_vector(network) # set the condlict-free direction to the network
39+
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
4040
optimizer.step()
4141
```
4242

@@ -55,7 +55,7 @@ for input_i in dataset:
5555
loss_i.backward()
5656
grads.append(get_gradient_vector(network))
5757
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
58-
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
58+
apply_gradient_vector(network,g_config) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
5959
optimizer.step()
6060
```
6161

@@ -78,7 +78,7 @@ for input_i in dataset:
7878
loss_i.backward()
7979
grads.append(get_gradient_vector(network))
8080
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
81-
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
81+
apply_gradient_vector(network,g_config) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
8282
optimizer.step()
8383
```
8484

pypi_desc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ for input_i in dataset:
103103
loss_i.backward()
104104
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
105105
g_config=ConFIG_update(grads) # calculate the conflict-free direction
106-
apply_gradient_vector(network) # set the condlict-free direction to the network
106+
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
107107
optimizer.step()
108108
```
109109

0 commit comments

Comments
 (0)