Skip to content

Commit

Permalink
Tutorials: use IntersectionDataset in sampler (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Sep 3, 2022
1 parent 48bb2d4 commit b19d193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/benchmarking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
" chesapeake = ChesapeakeDE(chesapeake_root, cache=cache)\n",
" naip = NAIP(naip_root, crs=chesapeake.crs, res=chesapeake.res, cache=cache)\n",
" dataset = chesapeake & naip\n",
" sampler = RandomGeoSampler(naip, size=1000, length=888)\n",
" sampler = RandomGeoSampler(dataset, size=1000, length=888)\n",
" dataloader = DataLoader(\n",
" dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples\n",
" )\n",
Expand Down Expand Up @@ -265,7 +265,7 @@
" chesapeake = ChesapeakeDE(chesapeake_root, cache=cache)\n",
" naip = NAIP(naip_root, crs=chesapeake.crs, res=chesapeake.res, cache=cache)\n",
" dataset = chesapeake & naip\n",
" sampler = GridGeoSampler(naip, size=1000, stride=500)\n",
" sampler = GridGeoSampler(dataset, size=1000, stride=500)\n",
" dataloader = DataLoader(\n",
" dataset, batch_size=12, sampler=sampler, collate_fn=stack_samples\n",
" )\n",
Expand Down Expand Up @@ -318,7 +318,7 @@
" chesapeake = ChesapeakeDE(chesapeake_root, cache=cache)\n",
" naip = NAIP(naip_root, crs=chesapeake.crs, res=chesapeake.res, cache=cache)\n",
" dataset = chesapeake & naip\n",
" sampler = RandomBatchGeoSampler(naip, size=1000, batch_size=12, length=888)\n",
" sampler = RandomBatchGeoSampler(dataset, size=1000, batch_size=12, length=888)\n",
" dataloader = DataLoader(dataset, batch_sampler=sampler, collate_fn=stack_samples)\n",
" duration, count = time_epoch(dataloader)\n",
" print(duration, count)"
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
},
"outputs": [],
"source": [
"sampler = RandomGeoSampler(naip, size=1000, length=10)"
"sampler = RandomGeoSampler(dataset, size=1000, length=10)"
]
},
{
Expand Down

0 comments on commit b19d193

Please sign in to comment.