18963866ca72089649c0004d0e981b8f2c26636f,thinc/extra/wrappers.py,PyTorchWrapper,begin_update,#PyTorchWrapper#Any#Any#,23

Before Change


                self._optimizer.step()
                self._optimizer.zero_grad()
            return dX
        return self.ops.asarray(y_var.data), backward_pytorch

    def _create_optimizer(self, sgd):
        params = self._model.parameters()

After Change


                self._optimizer.step()
                self._optimizer.zero_grad()
            return torch2xp(x_var.grad)
        return torch2xp(y_var), backward_pytorch

    def _create_optimizer(self, sgd):
        params = self._model.parameters()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: 18963866ca72089649c0004d0e981b8f2c26636f
Time: 2018-09-11
Author: honnibal@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapper
Method Name: begin_update


Project Name: explosion/thinc
Commit Name: 18963866ca72089649c0004d0e981b8f2c26636f
Time: 2018-09-11
Author: honnibal@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapperRNN
Method Name: begin_update


Project Name: explosion/thinc
Commit Name: 6e2199b17bec387a082d452119f971bf489aac44
Time: 2018-09-11
Author: honnibal@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapperRNN
Method Name: begin_update


Project Name: explosion/thinc
Commit Name: 6e2199b17bec387a082d452119f971bf489aac44
Time: 2018-09-11
Author: honnibal@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapper
Method Name: begin_update