0152660a10414335b57a30cd99a6e3648df64491,catalyst/dl/callbacks/criterion.py,CriterionCallback,_compute_loss,#CriterionCallback#Any#Any#,38

Before Change


                state.loss = {self.loss_key: loss}

    def _compute_loss(self, state: RunnerState, criterion):
        loss = criterion(
            state.output[self.output_key], state.input[self.input_key]
        )
        return loss

    def on_stage_start(self, state: RunnerState):
        assert state.criterion is not None

After Change



    def _compute_loss(self, state: RunnerState, criterion):
        output = self._get(state.output, self.output_key)
        input = self._get(state.input, self.input_key)

        loss = criterion(output, input)
        return loss

    def on_stage_start(self, state: RunnerState):
        assert state.criterion is not None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: catalyst-team/catalyst
Commit Name: 0152660a10414335b57a30cd99a6e3648df64491
Time: 2019-09-16
Author: tez.romach@gmail.com
File Name: catalyst/dl/callbacks/criterion.py
Class Name: CriterionCallback
Method Name: _compute_loss


Project Name: bearpaw/pytorch-pose
Commit Name: 87b7e56093996e908d310ccd852e7df0a88f2f19
Time: 2019-02-25
Author: platero.yang@gmail.com
File Name: example/main.py
Class Name:
Method Name: train