Ejemplo n.º 1
0
 def _set_writer(self, train_config):
     if train_config["writer"] is None:
         self.writer = None
     elif train_config["writer"] == "json":
         self.writer = LogWriter(**(train_config["writer_config"]))
     elif train_config["writer"] == "tensorboard":
         self.writer = TensorBoardWriter(**(train_config["writer_config"]))
     else:
         raise Exception(f"Unrecognized writer: {train_config['writer']}")
Ejemplo n.º 2
0
 def _set_writer(self):
     writer_config = self.config["writer_config"]
     writer_config["verbose"] = self.config["verbose"]
     if self.config["writer"] is None:
         self.writer = None
     elif self.config["writer"] == "json":
         self.writer = LogWriter(**writer_config)
     elif self.config["writer"] == "tensorboard":
         self.writer = TensorBoardWriter(**writer_config)
     else:
         raise Exception(f"Unrecognized writer: {self.config['writer']}")