Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config pin_memory Option #67

Merged
merged 1 commit into from
Sep 3, 2024
Merged
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 luxonis_train/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def __init__(
drop_last=(
self.cfg.trainer.skip_last_batch if view == "train" else False
),
pin_memory=self.cfg.trainer.pin_memory,
sampler=sampler if view == "train" else None,
)
for view in ["train", "val", "test"]
Expand Down
1 change: 1 addition & 0 deletions luxonis_train/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ class TrainerConfig(BaseModelExtraForbid):
validation_interval: Literal[-1] | PositiveInt = 1
num_log_images: NonNegativeInt = 4
skip_last_batch: bool = True
pin_memory: bool = True
log_sub_losses: bool = True
save_top_k: Literal[-1] | NonNegativeInt = 3

Expand Down
Loading