Skip to content

Commit 8fad81b

Browse files
committed
change grad to velocity_vec variable
1 parent edce947 commit 8fad81b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/optimize_2d_momentum_bumpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def bumpy_grad(pos: np.ndarray) -> np.ndarray:
6464
step_total = 1 # TODO: Choose the total number of steps.
6565

6666
pos_list = [start_pos]
67-
grad = np.array((0.0, 0.0))
67+
velocity_vec = np.array((0.0, 0.0))
6868
# TODO implement gradient descent with momentum.
6969

7070
for pos in pos_list:

src/optimize_2d_momentum_bumpy_jax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def bumpy_function(pos: np.ndarray) -> np.ndarray:
5757
step_total = 100
5858

5959
pos_list = [start_pos]
60-
grad = np.array((0.0, 0.0))
60+
velocity_vec = np.array((0.0, 0.0))
6161
# TODO: Implement gradient descent with momentum.
6262

6363
for pos in pos_list:

0 commit comments

Comments
 (0)