We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e54af2b commit e7c4ac5Copy full SHA for e7c4ac5
questions/195_gradient-checkpointing/starter_code.py
@@ -1,4 +1,15 @@
1
+import numpy as np
2
+
3
# 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.
11
-def your_function(...):
12
+ Returns:
13
+ np.ndarray: The output after applying all functions, same shape as output of last function.
14
15
pass
0 commit comments