deeplabcut.pose_estimation_pytorch.data.snapshots
Code to handle storing models.
Classes:
| Name | Description |
|---|---|
Snapshot |
A snapshot for a model. |
Functions:
| Name | Description |
|---|---|
list_snapshots |
Lists snapshots in a model folder. |
Snapshot
dataclass
A snapshot for a model.
Source code in deeplabcut/pose_estimation_pytorch/data/snapshots.py
list_snapshots
list_snapshots(model_folder: Path, snapshot_prefix: str, best_in_last: bool = True) -> list[Snapshot]
Lists snapshots in a model folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Path
|
The model in which the snapshots are found. |
required |
|
str
|
The prefix for the snapshot names. |
required |
|
bool
|
Whether to place the snapshot with the best performance in the last position in the list, even if it wasn't the last epoch. |
True
|
Returns:
| Type | Description |
|---|---|
list[Snapshot]
|
The snapshots stored in a folder, sorted by the number of epochs they were
trained for. If |