0afa83b99fccef7be77ec5bb3fb1321f5a4b4dd6,thinc/backends/ops.py,Ops,backprop_take,#Ops#Any#Any#Any#,269
Before Change
return output
def backprop_take(self, dX: Array, which: Array, nP: int) -> Array:
dX__bop = self.allocate((dX.shape[0], dX.shape[1], nP))
for i in range(nP):
dX__bop[:, :, i] += dX * (which == i)
return dX__bop
After Change
return output
def backprop_take(self, dX: Array, which: Array, nP: int) -> Array:
dX__bop = self.alloc_f3d(dX.shape[0], dX.shape[1], nP)
for i in range(nP):
dX__bop[:, :, i] += dX * (which == i)
return dX__bop
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: explosion/thinc
Commit Name: 0afa83b99fccef7be77ec5bb3fb1321f5a4b4dd6
Time: 2020-01-07
Author: justindujardin@users.noreply.github.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: backprop_take
Project Name: explosion/thinc
Commit Name: 0afa83b99fccef7be77ec5bb3fb1321f5a4b4dd6
Time: 2020-01-07
Author: justindujardin@users.noreply.github.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: seq2col
Project Name: explosion/thinc
Commit Name: 0afa83b99fccef7be77ec5bb3fb1321f5a4b4dd6
Time: 2020-01-07
Author: justindujardin@users.noreply.github.com
File Name: thinc/layers/recurrent.py
Class Name:
Method Name: forward