@@ -208,31 +208,34 @@ def tf_to_pb(sess, checkpoint, output, output_dir=None):
208208 initializer_nodes = '' )
209209
210210
211- def export_model (cfg_path , iteration = None , shuffle = 1 , trainingsetindex = 0 , snapshotindex = None , TFGPUinference = True , overwrite = False , make_tar = True ):
211+ def export_model (cfg_path , shuffle = 1 , trainingsetindex = 0 , snapshotindex = None ,
212+ iteration = None , TFGPUinference = True , overwrite = False , make_tar = True ):
212213 '''
213214
214- Export DLC models for the model zoo or for live inference.
215- Saves the pose configuration, snapshot files, and frozen graph of the model to
216- a directory named exported-models within the project directory
215+ Export DeepLabCut models for the model zoo or for live inference.
216+
217+ Saves the pose configuration, snapshot files, and frozen TF graph of the model to
218+ directory named exported-models within the project directory
217219
218220 Parameters
219221 -----------
220222
221223 cfg_path : string
222224 path to the DLC Project config.yaml file
223225
224- iteration : int, optional
225- the model iteration you wish to export.
226- If None, uses the iteration listed in the config file
227-
228226 shuffle : int, optional
229227 the shuffle of the model to export. default = 1
230228
231229 trainingsetindex : int, optional
232230 the index of the training fraction for the model you wish to export. default = 1
233231
234232 snapshotindex : int, optional
235- the snapshot index for the weights you wish to export. If None, uses the snapshotindex as defined in 'config.yaml'. Default = None
233+ the snapshot index for the weights you wish to export. If None,
234+ uses the snapshotindex as defined in 'config.yaml'. Default = None
235+
236+ iteration : int, optional
237+ The model iteration (active learning loop) you wish to export. If None,
238+ the iteration listed in the config file is used.
236239
237240 TFGPUinference : bool, optional
238241 use the tensorflow inference model? Default = True
@@ -244,6 +247,12 @@ def export_model(cfg_path, iteration=None, shuffle=1, trainingsetindex=0, snapsh
244247 make_tar : bool, optional
245248 Do you want to compress the exported directory to a tar file? Default = True
246249 This is necessary to export to the model zoo, but not for live inference.
250+
251+ Example:
252+ --------
253+ Export the first stored snapshot for model trained with shuffle 3:
254+ >>> deeplabcut.export_model('/analysis/project/reaching-task/config.yaml',shuffle=3, snapshotindex=-1)
255+ --------
247256 '''
248257
249258 ### read config file
0 commit comments