Skip to content

Commit

Permalink
Fix: Correct concatenation of datasets in train conditioning
Browse files Browse the repository at this point in the history
Summary: ChainDataset is iterable, and it toes not go along with a custom batch sampler.

Reviewed By: bottler

Differential Revision: D42742315

fbshipit-source-id: 40a715c8d24abe72cb2777634247d7467f628564
  • Loading branch information
shapovalov authored and facebook-github-bot committed Jan 26, 2023
1 parent 11959e0 commit 3239594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytorch3d/implicitron/dataset/data_loader_map_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pytorch3d.implicitron.tools.config import registry, ReplaceableBase
from torch.utils.data import (
BatchSampler,
ChainDataset,
ConcatDataset,
DataLoader,
RandomSampler,
Sampler,
Expand Down Expand Up @@ -482,7 +482,7 @@ def _train_loader(
num_batches=num_batches,
)
return DataLoader(
ChainDataset([dataset, train_dataset]),
ConcatDataset([dataset, train_dataset]),
batch_sampler=sampler,
**data_loader_kwargs,
)
Expand Down

0 comments on commit 3239594

Please sign in to comment.