a392ddaeae3a8343a968c8839afeea70b6f3a8b8,thinc/layers/recurrent.py,,recurrent,#,6

Before Change




def recurrent(step_model: Model) -> Model:
    return Model(step_model.name, forward, layers=[step_model])


def forward(model: Model, X_size_at_t: Tuple[Array, Array], is_train: bool):
    // Expect padded batches, sorted by decreasing length. The size_at_t array

After Change


        dims={"nO": step_model.get_dim("nO") if step_model.has_dim("nO") else None},
        layers=[step_model]
    )
    if model.has_dim("nO"):
        model.initialize()
    return model


def init(model, X=None, Y=None):
    Xt = X[0][0] if X is not None else None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: a392ddaeae3a8343a968c8839afeea70b6f3a8b8
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/layers/recurrent.py
Class Name:
Method Name: recurrent


Project Name: explosion/thinc
Commit Name: 5dccee984b2c25f6508947d3731b8934296ff4c5
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/layers/lstm.py
Class Name:
Method Name: LSTM_step


Project Name: explosion/thinc
Commit Name: 25c541e93c0ac1cafe517eba573d0c7704ed7a1b
Time: 2020-01-12
Author: ines@ines.io
File Name: thinc/layers/embed.py
Class Name:
Method Name: Embed