0e3ecd7a2a4c544de6228ed466c29992f65def8e,cuda_functional.py,SRU_Compute_GPU,backward,#SRU_Compute_GPU#Any#Any#,539
Before Change
if skip_type > 0 and k_ == 3 and scale_x != 1:
grad_x.mul_(scale_x)
return grad_u, grad_x, grad_wc.sum(1).view(-1), grad_bias.sum(1).view(-1), grad_init, None
After Change
init_ = x.new(ncols).zero_() if init is None else init
grad_u = u.new(*u.size()).zero_()
grad_wc = x.new(2*bidir*d).zero_()
grad_bias = x.new(2*bidir*d).zero_()
grad_init = x.new(batch, d*bidir)
grad_x = x.new(*x.size()).zero_() if skip_type > 0 and k_ == 3 else None
if skip_type > 0 and k_ == 3:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: asappresearch/sru
Commit Name: 0e3ecd7a2a4c544de6228ed466c29992f65def8e
Time: 2018-07-25
Author: hp@asapp.com
File Name: cuda_functional.py
Class Name: SRU_Compute_GPU
Method Name: backward
Project Name: OpenNMT/OpenNMT-py
Commit Name: 26de350ba308d7bb88d06ee9a317e36a157e7e4c
Time: 2017-09-10
Author: nasa4836@gmail.com
File Name: onmt/Models.py
Class Name: RNNDecoderState
Method Name: __init__
Project Name: OpenNMT/OpenNMT-py
Commit Name: a7a5cdc598afd6afa3d0e9d355360bebc4947c29
Time: 2017-01-24
Author: bryan.mccann.is@gmail.com
File Name: snli/model.py
Class Name: Encoder
Method Name: forward