PyTorch Hub models default to CUDA:0 if available (#2472)
* PyTorch Hub models default to CUDA:0 if available * device as string bug fix
This commit is contained in:
1 parent
2d41e70e82
commit
9b11f0c58b
4 files changed
+9
-7
No files matched your search
+2
-2
@@ -385,7 +385,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||
# Display cache
|
||||
nf, nm, ne, nc, n = cache.pop('results') # found, missing, empty, corrupted, total
|
||||
if exists:
|
||||
d = f"Scanning '{cache_path}' for images and labels... {nf} found, {nm} missing, {ne} empty, {nc} corrupted"
|
||||
d = f"Scanning '{cache_path}' images and labels... {nf} found, {nm} missing, {ne} empty, {nc} corrupted"
|
||||
tqdm(None, desc=prefix + d, total=n, initial=n) # display cache results
|
||||
assert nf > 0 or not augment, f'{prefix}No labels in {cache_path}. Can not train without labels. See {help_url}'
|
||||
|
||||
@@ -485,7 +485,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
||||
nc += 1
|
||||
print(f'{prefix}WARNING: Ignoring corrupted image and/or label {im_file}: {e}')
|
||||
|
||||
pbar.desc = f"{prefix}Scanning '{path.parent / path.stem}' for images and labels... " \
|
||||
pbar.desc = f"{prefix}Scanning '{path.parent / path.stem}' images and labels... " \
|
||||
f"{nf} found, {nm} missing, {ne} empty, {nc} corrupted"
|
||||
|
||||
if nf == 0:
|
||||
|
||||
Reference in new issue
Block a user