Skip to content

Instantly share code, notes, and snippets.

@timehaven
Created July 19, 2017 15:47
Show Gist options
  • Save timehaven/ef82ef489987e66debead3e3c9013c95 to your computer and use it in GitHub Desktop.
Save timehaven/ef82ef489987e66debead3e3c9013c95 to your computer and use it in GitHub Desktop.
...
i, j = 0, batch_size
for _ in range(nbatches):
sub = df.iloc[i:j]
X2 = bc[i:j]
...
# Calculate X and Y appropriately
...
yield [X, X2], Y
i = j
j += batch_size
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment