Skip to content

Instantly share code, notes, and snippets.

@adamjstewart
Created May 5, 2022 21:41
Show Gist options
  • Save adamjstewart/6416f0a80bef9d152778e94afb3e3141 to your computer and use it in GitHub Desktop.
Save adamjstewart/6416f0a80bef9d152778e94afb3e3141 to your computer and use it in GitHub Desktop.
Creating a geospatial sampler with TorchGeo
sampler = RandomGeoSampler(dataset, size=256, length=10000)
dataloader = DataLoader(dataset, batch_size=128, sampler=sampler, collate_fn=stack_samples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment