MCPcopy Create free account
hub / github.com/Tencent/ObjectDetection-OneStageDet / quit

Method quit

vedanet/engine/engine.py:259–274  ·  view source on GitHub ↗

This function gets called after every training epoch and decides if the training cycle continues. Return: Boolean: Whether are not to stop the training cycle Note: This function gets called before checking the ``self.sigint`` attribute. This mea

(self)

Source from the content-addressed store, hash-verified

257 log.error('test() function is not implemented')
258
259 def quit(self):
260 """ This function gets called after every training epoch and decides if the training cycle continues.
261
262 Return:
263 Boolean: Whether are not to stop the training cycle
264
265 Note:
266 This function gets called before checking the ``self.sigint`` attribute.
267 This means you can also check this attribute in this function. |br|
268 If it evaluates to **True**, you know the program will exit after this function and you can thus
269 perform the necessary actions (eg. save final weights).
270 """
271 if self.max_batches is not None:
272 return self.batch >= self.max_batches
273 else:
274 return False
275
276 def __sigint_handler(self, signal, frame):
277 if not self.sigint:

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected