Last active
May 17, 2021 20:45
-
-
Save sidneyarcidiacono/afaeb2f94765300f029b112886e7b435 to your computer and use it in GitHub Desktop.
Batch loading with Spektral
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here's the trick - we can't just call Keras' fit() method on this model. | |
# Instead, we have to use Loaders, which Spektral walks us through. Loaders create mini-batches by iterating over the graph | |
# Since we're using Spektral for an experiment, for our first trial we'll use the recommended loader in the getting started tutorial | |
# TODO: read up on modes and try other loaders later | |
from spektral.data import BatchLoader | |
loader = BatchLoader(data_train, batch_size=32) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment