MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / _update_device

Function _update_device

deeplabcut/compat.py:1981–1985  ·  view source on GitHub ↗
(gpu_to_use: int | None, torch_kwargs: dict)

Source from the content-addressed store, hash-verified

1979
1980
1981def _update_device(gpu_to_use: int | None, torch_kwargs: dict) -> None:
1982 if "device" not in torch_kwargs and gpu_to_use is not None:
1983 device = _gpu_to_use_to_device(gpu_to_use, device=None)
1984 if device is not None:
1985 torch_kwargs["device"] = device
1986
1987
1988def _gpu_to_use_to_device(gpu_to_use: int | None, device: str | None) -> str | None:

Callers 2

evaluate_networkFunction · 0.85
analyze_videosFunction · 0.85

Calls 1

_gpu_to_use_to_deviceFunction · 0.85

Tested by

no test coverage detected