Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dassl/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
# Parameter of RandomClassSampler
# Number of instances per class
_C.DATALOADER.TRAIN_X.N_INS = 16
_C.DATALOADER.TRAIN_X.DISABLE_DROP_LAST = False

# Setting for the train_u data-loader
_C.DATALOADER.TRAIN_U = CN()
Expand Down
2 changes: 1 addition & 1 deletion dassl/data/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def build_data_loader(
batch_size=batch_size,
sampler=sampler,
num_workers=cfg.DATALOADER.NUM_WORKERS,
drop_last=is_train and len(data_source) >= batch_size,
drop_last=is_train and len(data_source) >= batch_size and not cfg.DATALOADER.TRAIN_X.DISABLE_DROP_LAST,
pin_memory=(torch.cuda.is_available() and cfg.USE_CUDA)
)
assert len(data_loader) > 0
Expand Down