a392ddaeae3a8343a968c8839afeea70b6f3a8b8,thinc/layers/recurrent.py,,recurrent,#Any#,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




def recurrent(step_model: Model) -> Model:
    model = Model(
        step_model.name,
        forward,
        init=init,
        params={"initial_cells": None, "initial_hiddens": None},
        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: 7

Non-data size: 5

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: 1b92598dbfb489fe0f7a1c9b2015db5d702be948
Time: 2020-01-28
Author: honnibal+gh@gmail.com
File Name: thinc/layers/embed.py
Class Name:
Method Name: Embed


Project Name: XifengGuo/CapsNet-Keras
Commit Name: 37f599f61067cc6947c9bf783eace05227c0f450
Time: 2017-11-13
Author: guoxifeng1990@163.com
File Name: capsulenet.py
Class Name:
Method Name: CapsNet


Project Name: explosion/thinc
Commit Name: 7d340e5d642a594df7fed1679576751807cadaaf
Time: 2020-01-28
Author: ines@ines.io
File Name: thinc/layers/staticvectors.py
Class Name:
Method Name: StaticVectors


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: google-research/google-research
Commit Name: facef967746f844f52304e3acf5d3f7167651a77
Time: 2020-12-07
Author: joelshor@google.com
File Name: non_semantic_speech_benchmark/distillation/models.py
Class Name:
Method Name: get_keras_model


Project Name: tensorflow/models
Commit Name: 83f0a576015953b30bf8a05fc0033983e0d07354
Time: 2019-11-22
Author: chendouble@google.com
File Name: official/nlp/bert_models.py
Class Name:
Method Name: pretrain_model