1b92598dbfb489fe0f7a1c9b2015db5d702be948,thinc/layers/embed.py,,Embed,#,15

Before Change


    attrs: Dict[str, Any] = {"column": column}
    if dropout is not None:
        attrs["dropout_rate"] = dropout
    return Model(
        "embed",
        forward,
        init=partial(init, initializer),
        attrs=attrs,
        dims={"nO": nO, "nV": nV},
        params={"E": None},
    )


def forward(model: Model[InT, OutT], ids: InT, is_train: bool) -> Tuple[OutT, Callable]:
    nV = model.get_dim("nV")

After Change


        dims={"nO": nO, "nV": nV},
        params={"E": None},
    )
    model = model if column is None else chain(ints_getitem(column), model)
    model.attrs["column"] = column
    return cast(Model[InT, OutT], model)



def forward(model: Model[InT, OutT], ids: InT, is_train: bool) -> Tuple[OutT, Callable]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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: pgmpy/pgmpy
Commit Name: 97b2ccec94583a7876566a340f06e84a63340272
Time: 2015-03-26
Author: pratyaksh@me.com
File Name: pgmpy/inference/ExactInference.py
Class Name: VariableElimination
Method Name: induced_graph


Project Name: coala/coala-bears
Commit Name: 955d55293e8a2a96b2427af8d2c5de4cba6b1e79
Time: 2016-09-08
Author: mak95@arcor.de
File Name: bears/xml2/XMLBear.py
Class Name: XMLBear
Method Name: process_output