deeplabcut.pose_estimation_pytorch.utils
Functions:
| Name | Description |
|---|---|
create_folder |
Creates all folders contained in the path. |
fix_seeds |
Fixes the random seed for python, numpy and pytorch. |
resolve_device |
Determines which device should be used from the model config. |
create_folder
Creates all folders contained in the path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Path to the folder that should be created |
required |
fix_seeds
Fixes the random seed for python, numpy and pytorch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
the seed to set |
required |
Source code in deeplabcut/pose_estimation_pytorch/utils.py
resolve_device
Determines which device should be used from the model config.
When the device is set to 'auto': If an Nvidia GPU is available, selects the device as cuda:0. Selects 'mps' if available (on macOS) and the net type is compatible. Otherwise, returns 'cpu'. Otherwise, simply returns the selected device
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
dict
|
the configuration for the pose model |
required |
Returns:
| Type | Description |
|---|---|
str
|
the device on which training should be run |