Skip to content

Commit

Permalink
fix typos in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
qiauil committed Nov 6, 2024
1 parent dad1d74 commit 5f4323a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ for input_i in dataset:
loss_i.backward()
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
g_config=ConFIG_update(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # set the condlict-free direction to the network
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
optimizer.step()
```

Expand Down
6 changes: 3 additions & 3 deletions conflictfree/grad_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def ConFIG_update_double(
loss_i.backward()
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
g_config=ConFIG_update_double(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # set the condlict-free direction to the network
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
optimizer.step()
```
Expand Down Expand Up @@ -119,7 +119,7 @@ def ConFIG_update(
loss_i.backward()
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
g_config=ConFIG_update(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # set the condlict-free direction to the network
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
optimizer.step()
```
"""
Expand Down Expand Up @@ -231,7 +231,7 @@ class ConFIGOperator(GradientOperator):
loss_i.backward()
grads.append(get_gradient_vector(network))
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
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
optimizer.step()
```
Expand Down
2 changes: 1 addition & 1 deletion conflictfree/momentum_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class PseudoMomentumOperator(MomentumOperator):
loss_i.backward()
grads.append(get_gradient_vector(network))
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
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
optimizer.step()
```
"""
Expand Down
6 changes: 3 additions & 3 deletions docs/start/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for input_i in dataset:
loss_i.backward()
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
g_config=ConFIG_update(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # set the condlict-free direction to the network
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
optimizer.step()
```

Expand All @@ -55,7 +55,7 @@ for input_i in dataset:
loss_i.backward()
grads.append(get_gradient_vector(network))
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
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
optimizer.step()
```

Expand All @@ -78,7 +78,7 @@ for input_i in dataset:
loss_i.backward()
grads.append(get_gradient_vector(network))
g_config=operator.calculate_gradient(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # or simply use `operator.update_gradient(network,grads)` to calculate and set the condlict-free direction to the network
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
optimizer.step()
```

Expand Down
2 changes: 1 addition & 1 deletion pypi_desc.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ for input_i in dataset:
loss_i.backward()
grads.append(get_gradient_vector(network)) #get loss-specfic gradient
g_config=ConFIG_update(grads) # calculate the conflict-free direction
apply_gradient_vector(network) # set the condlict-free direction to the network
apply_gradient_vector(network,g_config) # set the condlict-free direction to the network
optimizer.step()
```

Expand Down

0 comments on commit 5f4323a

Please sign in to comment.