504166f623fee9ac5004369489c39838c875eab9,thinc/layers/bidirectional.py,,_reverse,#Any#Any#,34
Before Change
X, size_at_t = X_size_at_t
reverse_X = X[::-1]
reverse_size_at_t = ops.xp.ascontiguousarray(size_at_t[::-1])
return reverse_X, reverse_size_at_t
def _concatenate(ops, l2r, r2l):
size_at_t = l2r[1]
After Change
def _reverse(ops, Xp: Padded) -> Padded:
reverse_X = Xp.data[::-1]
return Padded(reverse_X, Xp.size_at_t)
def _concatenate(ops, l2r: Padded, r2l: Padded) -> Padded:
concatenated = ops.xp.hstack((l2r.data, r2l.data), axis=-1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: explosion/thinc
Commit Name: 504166f623fee9ac5004369489c39838c875eab9
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/layers/bidirectional.py
Class Name:
Method Name: _reverse
Project Name: explosion/thinc
Commit Name: f18edb70716b0262c211f8a8e0f6db531c1b8d55
Time: 2020-01-05
Author: honnibal+gh@gmail.com
File Name: thinc/layers/residual.py
Class Name:
Method Name: forward
Project Name: explosion/thinc
Commit Name: 504166f623fee9ac5004369489c39838c875eab9
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/layers/bidirectional.py
Class Name:
Method Name: _reverse
Project Name: explosion/thinc
Commit Name: 504166f623fee9ac5004369489c39838c875eab9
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/layers/bidirectional.py
Class Name:
Method Name: _concatenate