c50f2a812b23c77a90ad13a3f04f740277ebf268,thinc/layers/chain.py,,init,#Any#Any#Any#,69

Before Change


            nO = layer.get_dim("nI")
        else:
            break
    for layer in model.layers[:-1]:
        layer.initialize(X=X)
        if X is not None:
            X = layer.predict(X)

After Change


            break
    seen_nO = False
    for i, layer in enumerate(model.layers):
        if layer.has_dim("nO") is None:
            // If we"re the last layer with an nO, use Y.
            if all(lyr.has_dim("nO") is False for lyr in model.layers[i+1:]):
                layer.initialize(X=X, Y=Y)
            else:
                raise ValueError("Cannot infer output size of layer: {layer.name}")
        else:
            layer.initialize(X=X)
        if X is not None:
            X = layer.predict(X)
    if model.layers[0].has_dim("nI"):
        model.set_dim("nI", model.layers[0].get_dim("nI"))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: c50f2a812b23c77a90ad13a3f04f740277ebf268
Time: 2020-01-12
Author: honnibal+gh@gmail.com
File Name: thinc/layers/chain.py
Class Name:
Method Name: init


Project Name: explosion/thinc
Commit Name: 612fb894d89d3d47ebecb8f7959a1a152acba894
Time: 2020-01-08
Author: svlandeg@users.noreply.github.com
File Name: thinc/layers/residual.py
Class Name:
Method Name: init


Project Name: explosion/thinc
Commit Name: db1989f7f59a3a7a5fc2016c24f045c40ad20f1a
Time: 2020-03-12
Author: svlandeg@users.noreply.github.com
File Name: thinc/layers/chain.py
Class Name:
Method Name: chain