ultralytics 8.0.133 add torchvision compatibility check (#3703)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0821ccb618
commit
c55a98ab8e
17 changed files with 140 additions and 68 deletions
|
|
@ -63,7 +63,7 @@ class _RepeatSampler:
|
|||
|
||||
|
||||
def seed_worker(worker_id): # noqa
|
||||
# Set dataloader worker seed https://pytorch.org/docs/stable/notes/randomness.html#dataloader
|
||||
"""Set dataloader worker seed https://pytorch.org/docs/stable/notes/randomness.html#dataloader."""
|
||||
worker_seed = torch.initial_seed() % 2 ** 32
|
||||
np.random.seed(worker_seed)
|
||||
random.seed(worker_seed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue