8e12624641eab7a7e73497ea96124bb39aca1c01,memcnn/models/revop.py,InvertibleCheckpointFunction,forward,#,13

Before Change


        ctx.num_bwd_passes = num_bwd_passes

        with torch.no_grad():
            x = input_t.detach()  // Makes a detached copy which shares the storage
            output = ctx.fn(x)

        detached_output = output.detach_()  // Detaches y in-place (inbetween computations can now be discarded)

After Change


        ctx.num_bwd_passes = num_bwd_passes
        ctx.num_inputs = num_inputs

        input_t = inputs_and_weights[:num_inputs]
        ctx.input_requires_grad = [element.requires_grad for element in input_t]

        with torch.no_grad():
            // Makes a detached copy which shares the storage
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: silvandeleemput/memcnn
Commit Name: 8e12624641eab7a7e73497ea96124bb39aca1c01
Time: 2020-03-04
Author: ce377@orthosie.damtp.cam.ac.uk
File Name: memcnn/models/revop.py
Class Name: InvertibleCheckpointFunction
Method Name: forward


Project Name: PIQuIL/QuCumber
Commit Name: a3645eada1fd6b0dc2f262033a93b81a6ca84b55
Time: 2019-12-23
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/unitaries.py
Class Name:
Method Name: rotate_psi_inner_prod


Project Name: mozilla/TTS
Commit Name: 7bcdb7ac3540da3a9377ff8a47ff227041a06963
Time: 2020-10-29
Author: erogol@hotmail.com
File Name: TTS/bin/train_wavegrad.py
Class Name:
Method Name: train