Method
__init__
(
self,
name,
dataset_size=-1,
local_rank=0,
rank_size=1,
has_trained_epoch=0,
has_trained_step=0,
micro_size=1,
sink_size=2,
tb_writer=None,
)
Source from the content-addressed store, hash-verified
| 35 | """ |
| 36 | |
| 37 | def __init__( |
| 38 | self, |
| 39 | name, |
| 40 | dataset_size=-1, |
| 41 | local_rank=0, |
| 42 | rank_size=1, |
| 43 | has_trained_epoch=0, |
| 44 | has_trained_step=0, |
| 45 | micro_size=1, |
| 46 | sink_size=2, |
| 47 | tb_writer=None, |
| 48 | ): |
| 49 | super(LossCallBack, self).__init__() |
| 50 | self._dataset_size = dataset_size |
| 51 | self.local_rank = local_rank |
| 52 | self.rank_size = rank_size |
| 53 | self.has_trained_epoch = has_trained_epoch |
| 54 | self.has_trained_step = has_trained_step |
| 55 | self.micro_size = micro_size |
| 56 | self.sink_size = sink_size |
| 57 | |
| 58 | self.summary_writer = tb_writer |
| 59 | print("load has trained epoch :{} and step: {}".format(has_trained_epoch, has_trained_step), flush=True) |
| 60 | |
| 61 | def step_end(self, run_context): |
| 62 | """ |
Tested by
no test coverage detected