// 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