1c02a7df353ab5e66b73565d204d51b03bd0d65b,thinc/backends/jax_ops.py,,recurrent_lstm,#Any#Any#Any#Any#Any#,627

Before Change


    state = ((W, b, hidden, cell, X), (Y, gates))
    state = jax.lax.fori_loop(0, X.shape[0], _lstm_stepper, state)
    (W, b, hidden, cell, X), (Y, gates) = state 
    return Y, cell, gates


@jax_jit()

After Change


    C = xp.zeros((nL+1, nB, nO), dtype="f")
    // Set initial hidden and cell states. The Y and C will be shifted 1,
    // so that we can have fewer arrays.
    Y = index_update(Y, index[0], h0)
    C = index_update(C, index[0], c0)
    state = ((W, b, X), (Y, C, G))
    state = jax.lax.fori_loop(0, X.shape[0], _lstm_stepper, state)
    (W, b, X), (Y, C, G) = state 
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: 1c02a7df353ab5e66b73565d204d51b03bd0d65b
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name:
Method Name: recurrent_lstm


Project Name: explosion/thinc
Commit Name: 26359ff3da29f088976a5bb4d6c67abe84b8b983
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name:
Method Name: backprop_lstm_stepper


Project Name: explosion/thinc
Commit Name: 1c02a7df353ab5e66b73565d204d51b03bd0d65b
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name:
Method Name: _lstm_stepper