93c59ebb962058841c6913c8ba4b42830ecf82de,examples/textcat_from_config.py,,main,#,50

Before Change



    // Set the remaining config parameters based on the loaded dataset
    config["model"]["*"]["with_array"]["layer"]["nV"] = len(vocab)
    config["model"]["*"]["softmax"]["nO"] = nr_class

    // Load the config
    loaded_config = thinc.registry.make_from_config(config)

After Change


    // Here we have the model and optimizer, built for us by the registry.
    model = loaded_config["model"]
    model.get_ref("embed").set_dim("nV", len(vocab))
    model.initialize(X=train_X, Y=train_y)

    optimizer = loaded_config["optimizer"]

    // Get training parameters from config
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: explosion/thinc
Commit Name: 93c59ebb962058841c6913c8ba4b42830ecf82de
Time: 2020-01-16
Author: adrianeboyd@gmail.com
File Name: examples/textcat_from_config.py
Class Name:
Method Name: main


Project Name: explosion/thinc
Commit Name: 4b0134242f0e79bcdb022623be29e1e7db5445fc
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: examples/scripts/ray_parallel.py
Class Name:
Method Name: main


Project Name: osmr/imgclsmob
Commit Name: 5c5a490629aa20568434d1c6d11f4be4b8155518
Time: 2021-02-02
Author: osemery@gmail.com
File Name: tests/convert_gl2tf2_lstm.py
Class Name:
Method Name: gl_calc