MCPcopy Index your code
hub / github.com/MoonInTheRiver/DiffSinger / _training_step

Method _training_step

tasks/base_task.py:117–124  ·  view source on GitHub ↗

:param sample: :param batch_idx: :return: total loss: torch.Tensor, loss_log: dict

(self, sample, batch_idx, optimizer_idx)

Source from the content-addressed store, hash-verified

115 self.training_losses_meter = {'total_loss': utils.AvgrageMeter()}
116
117 def _training_step(self, sample, batch_idx, optimizer_idx):
118 """
119
120 :param sample:
121 :param batch_idx:
122 :return: total loss: torch.Tensor, loss_log: dict
123 """
124 raise NotImplementedError
125
126 def training_step(self, sample, batch_idx, optimizer_idx=-1):
127 loss_ret = self._training_step(sample, batch_idx, optimizer_idx)

Callers 1

training_stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected