845db182c394d74d2d3a588a1fa15a18b91e7efc,thinc/layers/hashembed.py,,forward,#Any#Any#Any#,40

Before Change




def forward(model: Model[InT, OutT], ids: InT, is_train: bool) -> Tuple[OutT, Callable]:
    if model.has_attr("dropout_rate"):
        dropout = model.get_attr("dropout_rate")
    else:
        dropout = None
    E = model.get_param("E")
    seed = model.get_attr("seed")
    column = model.get_attr("column")
    nV = E.shape[0]
    input_shape = tuple(ids.shape)
    if ids.ndim >= 2:
        ids = model.ops.as_contig(ids[:, column], dtype="uint64")

After Change




def forward(model: Model[InT, OutT], ids: InT, is_train: bool) -> Tuple[OutT, Callable]:
    dropout = model.attrs.get("dropout_rate")
    E = model.get_param("E")
    seed = model.attrs["seed"]
    column = model.attrs["column"]
    nV = E.shape[0]
    input_shape = tuple(ids.shape)
    if ids.ndim >= 2:
        ids = model.ops.as_contig(ids[:, column], dtype="uint64")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: explosion/thinc
Commit Name: 845db182c394d74d2d3a588a1fa15a18b91e7efc
Time: 2020-01-24
Author: ines@ines.io
File Name: thinc/layers/hashembed.py
Class Name:
Method Name: forward


Project Name: explosion/thinc
Commit Name: 845db182c394d74d2d3a588a1fa15a18b91e7efc
Time: 2020-01-24
Author: ines@ines.io
File Name: thinc/layers/staticvectors.py
Class Name:
Method Name: forward


Project Name: explosion/thinc
Commit Name: 845db182c394d74d2d3a588a1fa15a18b91e7efc
Time: 2020-01-24
Author: ines@ines.io
File Name: thinc/layers/hashembed.py
Class Name:
Method Name: forward


Project Name: explosion/thinc
Commit Name: 845db182c394d74d2d3a588a1fa15a18b91e7efc
Time: 2020-01-24
Author: ines@ines.io
File Name: thinc/layers/embed.py
Class Name:
Method Name: forward