Skip to content

Instantly share code, notes, and snippets.

@mohdsanadzakirizvi
Created October 16, 2019 06:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mohdsanadzakirizvi/f68d7a327d9911c1789388a6d0081da4 to your computer and use it in GitHub Desktop.
%include "/content/swift-datascience/MNIST.swift"
// Load dataset
let dataset = MNIST(batchSize: 128)
// Get first 5 images
let imgs = dataset.trainingImages.minibatch(at: 0, batchSize: 5).makeNumpyArray()
print(imgs.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment