|
|
|
|
|
|
|
|
|
|
|
|
|
|
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python')) |
|
|
check_requirements(exclude=('tensorboard', 'thop', 'opencv-python')) |
|
|
name = Path(name) |
|
|
name = Path(name) |
|
|
path = name.with_suffix('.pt') if name.suffix == '' else name # checkpoint path |
|
|
|
|
|
|
|
|
path = name.with_suffix('.pt') if name.suffix == '' and not name.is_dir() else name # checkpoint path |
|
|
try: |
|
|
try: |
|
|
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device) |
|
|
device = select_device(('0' if torch.cuda.is_available() else 'cpu') if device is None else device) |
|
|
|
|
|
|