Skip to content

Commit e7c4ac5

Browse files
committed
add starter code
1 parent e54af2b commit e7c4ac5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1+
import numpy as np
2+
13
# Implement your function below.
4+
def checkpoint_forward(funcs, input_arr):
5+
"""
6+
Applies a list of functions in sequence to the input array, simulating gradient checkpointing by not storing intermediates.
7+
8+
Args:
9+
funcs (list of callables): List of functions to apply in sequence.
10+
input_arr (np.ndarray): Input numpy array.
211
3-
def your_function(...):
12+
Returns:
13+
np.ndarray: The output after applying all functions, same shape as output of last function.
14+
"""
415
pass

0 commit comments

Comments
 (0)