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 8dd48c7 commit 805b2d7Copy full SHA for 805b2d7
keras_cv/layers/preprocessing/random_augmentation_pipeline.py
@@ -100,6 +100,11 @@ def _augment():
100
# Originally we used a lambda, but due to Python's
101
# lack of loop level scope this causes unexpected
102
# 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.
108
branch_fns = [
109
(i, self._curry_call_layer(inputs, layer))
110
for (i, layer) in enumerate(self.layers)
0 commit comments