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

Method save_testing_log

tensorlayer/db.py:454–472  ·  view source on GitHub ↗

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

(self, **kwargs)

Source from the content-addressed store, hash-verified

452 logging.info("[Database] valid log: " + _log)
453
454 def save_testing_log(self, **kwargs):
455 """Saves the testing log, timestamp will be added automatically.
456
457 Parameters
458 -----------
459 kwargs : logging information
460 Events, such as accuracy, loss, step number and etc.
461
462 Examples
463 ---------
464 >>> db.save_testing_log(accuracy=0.33, loss=0.98)
465
466 """
467
468 self._fill_project_info(kwargs)
469 kwargs.update({'time': datetime.utcnow()})
470 _result = self.db.TestLog.insert_one(kwargs)
471 _log = self._print_dict(kwargs)
472 logging.info("[Database] test log: " + _log)
473
474 def delete_training_log(self, **kwargs):
475 """Deletes training log.

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