MCPcopy
hub / github.com/tensorlayer/TensorLayer / save_training_log

Method save_training_log

tensorlayer/db.py:414–432  ·  view source on GitHub ↗

Saves the training log, timestamp will be added automatically. Parameters ----------- kwargs : logging information Events, such as accuracy, loss, step number and etc. Examples --------- >>> db.save_training_log(accuracy=0.33, loss=0.98)

(self, **kwargs)

Source from the content-addressed store, hash-verified

412
413 # =========================== LOGGING ===============================
414 def save_training_log(self, **kwargs):
415 """Saves the training log, timestamp will be added automatically.
416
417 Parameters
418 -----------
419 kwargs : logging information
420 Events, such as accuracy, loss, step number and etc.
421
422 Examples
423 ---------
424 >>> db.save_training_log(accuracy=0.33, loss=0.98)
425
426 """
427
428 self._fill_project_info(kwargs)
429 kwargs.update({'time': datetime.utcnow()})
430 _result = self.db.TrainLog.insert_one(kwargs)
431 _log = self._print_dict(kwargs)
432 logging.info("[Database] train log: " + _log)
433
434 def save_validation_log(self, **kwargs):
435 """Saves the validation log, timestamp will be added automatically.

Callers

nothing calls this directly

Calls 3

_fill_project_infoMethod · 0.95
_print_dictMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected