Non-Deterministic Training Despite deterministic=True (#15961)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
This commit is contained in:
parent
7c61569630
commit
ec9f4a7b1a
1 changed files with 5 additions and 0 deletions
|
|
@ -91,6 +91,11 @@ class BaseDataset(Dataset):
|
|||
self.npy_files = [Path(f).with_suffix(".npy") for f in self.im_files]
|
||||
self.cache = cache.lower() if isinstance(cache, str) else "ram" if cache is True else None
|
||||
if (self.cache == "ram" and self.check_cache_ram()) or self.cache == "disk":
|
||||
if self.cache == "ram" and hyp.deterministic:
|
||||
LOGGER.warning(
|
||||
"WARNING ⚠️ cache='ram' may produce non-deterministic training results. "
|
||||
"Consider cache='disk' as a deterministic alternative if your disk space allows."
|
||||
)
|
||||
self.cache_images()
|
||||
|
||||
# Transforms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue