1820aba6402a29edc2824871c5db7bd7c730cb95,memcnn/models/additive.py,AdditiveBlockInverseFunction2,backward,#Any#Any#,480

Before Change


            y2_stop.requires_grad = True

            // restore input
            y.set_(torch.cat([y1, y2], dim=1).contiguous()).detach()

            // compute outputs building a sub-graph
            z1 = y2_stop - G_y1

After Change


            y2_stop.requires_grad = True

            // restore input
            yout = torch.cat([y1, y2], dim=1).contiguous()
            y.storage().resize_(int(np.prod(yout.shape)))
            y.set_(yout).detach()  // NOTE .detach() is very important here.

            // compute outputs building a sub-graph
            z1 = y2_stop - G_y1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: silvandeleemput/memcnn
Commit Name: 1820aba6402a29edc2824871c5db7bd7c730cb95
Time: 2019-05-17
Author: silvandeleemput@gmail.com
File Name: memcnn/models/additive.py
Class Name: AdditiveBlockInverseFunction2
Method Name: backward


Project Name: silvandeleemput/memcnn
Commit Name: 1820aba6402a29edc2824871c5db7bd7c730cb95
Time: 2019-05-17
Author: silvandeleemput@gmail.com
File Name: memcnn/models/additive.py
Class Name: AdditiveBlockFunction2
Method Name: backward


Project Name: silvandeleemput/memcnn
Commit Name: 1820aba6402a29edc2824871c5db7bd7c730cb95
Time: 2019-05-17
Author: silvandeleemput@gmail.com
File Name: memcnn/models/affine.py
Class Name: AffineBlockInverseFunction2
Method Name: backward