(model_func, kwargs)
| 215 | |
| 216 | @pytest.mark.parametrize("model_func,kwargs", [(StaticVectors, {"nO": 128, "nM": 300})]) |
| 217 | def test_empty_docs(model_func, kwargs): |
| 218 | nlp = English() |
| 219 | model = model_func(**kwargs).initialize() |
| 220 | # Test the layer can be called successfully with 0, 1 and 2 empty docs. |
| 221 | for n_docs in range(3): |
| 222 | docs = [nlp("") for _ in range(n_docs)] |
| 223 | # Test predict |
| 224 | model.predict(docs) |
| 225 | # Test backprop |
| 226 | output, backprop = model.begin_update(docs) |
| 227 | backprop(output) |
| 228 | |
| 229 | |
| 230 | def test_init_extract_spans(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…