Trains the network with the labels in the training dataset. Parameters ---------- config : string Full path of the config.yaml file as a string. shuffle: int, optional, default=1 Integer value specifying the shuffle index to select for traini
(
config,
shuffle=1,
trainingsetindex=0,
max_snapshots_to_keep=5,
displayiters=None,
saveiters=None,
maxiters=None,
allow_growth=True,
gputouse=None,
autotune=False,
keepdeconvweights=True,
modelprefix="",
superanimal_name="",
superanimal_transfer_learning=False,
)
| 46 | |
| 47 | |
| 48 | def train_network( |
| 49 | config, |
| 50 | shuffle=1, |
| 51 | trainingsetindex=0, |
| 52 | max_snapshots_to_keep=5, |
| 53 | displayiters=None, |
| 54 | saveiters=None, |
| 55 | maxiters=None, |
| 56 | allow_growth=True, |
| 57 | gputouse=None, |
| 58 | autotune=False, |
| 59 | keepdeconvweights=True, |
| 60 | modelprefix="", |
| 61 | superanimal_name="", |
| 62 | superanimal_transfer_learning=False, |
| 63 | ): |
| 64 | """Trains the network with the labels in the training dataset. |
| 65 | |
| 66 | Parameters |
| 67 | ---------- |
| 68 | config : string |
| 69 | Full path of the config.yaml file as a string. |
| 70 | |
| 71 | shuffle: int, optional, default=1 |
| 72 | Integer value specifying the shuffle index to select for training. |
| 73 | |
| 74 | trainingsetindex: int, optional, default=0 |
| 75 | Integer specifying which TrainingsetFraction to use. |
| 76 | Note that TrainingFraction is a list in config.yaml. |
| 77 | |
| 78 | max_snapshots_to_keep: int or None |
| 79 | Sets how many snapshots are kept, i.e. states of the trained network. Every |
| 80 | saving iteration many times a snapshot is stored, however only the last |
| 81 | ``max_snapshots_to_keep`` many are kept! If you change this to None, then all |
| 82 | are kept. |
| 83 | See: https://github.com/DeepLabCut/DeepLabCut/issues/8#issuecomment-387404835 |
| 84 | |
| 85 | displayiters: optional, default=None |
| 86 | This variable is actually set in ``pose_config.yaml``. However, you can |
| 87 | overwrite it with this hack. Don't use this regularly, just if you are too lazy |
| 88 | to dig out the ``pose_config.yaml`` file for the corresponding project. If |
| 89 | ``None``, the value from there is used, otherwise it is overwritten! |
| 90 | |
| 91 | saveiters: optional, default=None |
| 92 | This variable is actually set in ``pose_config.yaml``. However, you can |
| 93 | overwrite it with this hack. Don't use this regularly, just if you are too lazy |
| 94 | to dig out the ``pose_config.yaml`` file for the corresponding project. |
| 95 | If ``None``, the value from there is used, otherwise it is overwritten! |
| 96 | |
| 97 | maxiters: optional, default=None |
| 98 | This variable is actually set in ``pose_config.yaml``. However, you can |
| 99 | overwrite it with this hack. Don't use this regularly, just if you are too lazy |
| 100 | to dig out the ``pose_config.yaml`` file for the corresponding project. |
| 101 | If ``None``, the value from there is used, otherwise it is overwritten! |
| 102 | |
| 103 | allow_growth: bool, optional, default=True. |
| 104 | For some smaller GPUs the memory issues happen. If ``True``, the memory |
| 105 | allocator does not pre-allocate the entire specified GPU memory region, instead |
nothing calls this directly
no test coverage detected