示例#1
0
 def load(self, path: str = None):
     loaded_items = util.load_pytree(path)
     self.params = loaded_items["params"]
     self.state = loaded_items["state"]
     self.opt_state = loaded_items["opt_state"]
     self.train_losses = loaded_items["train_losses"]
     self.test_losses = loaded_items["test_losses"]
示例#2
0
  def load(self, path: str=None):
    loaded_items = util.load_pytree(path)
    self.params = loaded_items["params"]
    self.state = loaded_items["state"]
    self.test_eval_times = loaded_items["test_eval_times"]

    self.trainer.load_items(loaded_items)
    self.tester.load_items(loaded_items)
示例#3
0
文件: layer.py 项目: jxzhangjhu/NuX
 def load(self, path: str=None):
   loaded_items = util.load_pytree(path)
   self.params = loaded_items["params"]
   self.state = loaded_items["state"]