Skip to content

Commit 3239594

Browse files
shapovalovfacebook-github-bot
authored andcommitted
Fix: Correct concatenation of datasets in train conditioning
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
1 parent 11959e0 commit 3239594

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch3d/implicitron/dataset/data_loader_map_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pytorch3d.implicitron.tools.config import registry, ReplaceableBase
1313
from torch.utils.data import (
1414
BatchSampler,
15-
ChainDataset,
15+
ConcatDataset,
1616
DataLoader,
1717
RandomSampler,
1818
Sampler,
@@ -482,7 +482,7 @@ def _train_loader(
482482
num_batches=num_batches,
483483
)
484484
return DataLoader(
485-
ChainDataset([dataset, train_dataset]),
485+
ConcatDataset([dataset, train_dataset]),
486486
batch_sampler=sampler,
487487
**data_loader_kwargs,
488488
)

0 commit comments

Comments
 (0)