Skip to content

Commit 805b2d7

Browse files
committed
Update comment
1 parent 8dd48c7 commit 805b2d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

keras_cv/layers/preprocessing/random_augmentation_pipeline.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ def _augment():
100100
# Originally we used a lambda, but due to Python's
101101
# lack of loop level scope this causes unexpected
102102
# behavior running outside of graph mode.
103+
#
104+
# Autograph has an edge case where the behavior of Python for loop
105+
# variables is inconsistent between Python and graph execution.
106+
# By using a list comprehension and currying, we mitigate
107+
# our code against both of these cases.
103108
branch_fns = [
104109
(i, self._curry_call_layer(inputs, layer))
105110
for (i, layer) in enumerate(self.layers)

0 commit comments

Comments
 (0)