spaCy/website/docs/api/architectures.md

70 lines
2.3 KiB
Markdown
Raw Normal View History

2020-07-03 17:48:21 +03:00
---
title: Model Architectures
teaser: Pre-defined model architectures included with the core library
source: spacy/ml/models
2020-07-28 21:33:52 +03:00
menu:
- ['Tok2Vec', 'tok2vec']
2020-07-29 12:36:42 +03:00
- ['Transformers', 'transformers']
2020-07-28 21:33:52 +03:00
- ['Parser & NER', 'parser']
- ['Text Classification', 'textcat']
- ['Entity Linking', 'entitylinker']
2020-07-03 17:48:21 +03:00
---
2020-07-08 14:34:35 +03:00
TODO: intro and how architectures work, link to
[`registry`](/api/top-level#registry),
[custom models](/usage/training#custom-models) usage etc.
2020-07-29 12:36:42 +03:00
## Tok2Vec architectures {#tok2vec source="spacy/ml/models/tok2vec.py"}
2020-07-08 14:34:35 +03:00
2020-07-28 21:33:52 +03:00
### spacy.HashEmbedCNN.v1 {#HashEmbedCNN}
### spacy.HashCharEmbedCNN.v1 {#HashCharEmbedCNN}
### spacy.HashCharEmbedBiLSTM.v1 {#HashCharEmbedBiLSTM}
2020-07-29 12:36:42 +03:00
## Transformer architectures {#transformers source="github.com/explosion/spacy-transformers/blob/master/spacy_transformers/architectures.py"}
### spacy-transformers.TransformerModel.v1 {#TransformerModel}
2020-07-29 19:45:12 +03:00
### spacy-transformers.Tok2VecListener.v1 {#Tok2VecListener}
2020-07-29 19:44:10 +03:00
2020-07-28 21:33:52 +03:00
## Parser & NER architectures {#parser source="spacy/ml/models/parser.py"}
### spacy.TransitionBasedParser.v1 {#TransitionBasedParser}
2020-07-08 14:34:35 +03:00
> #### Example Config
>
> ```ini
> [model]
> @architectures = "spacy.TransitionBasedParser.v1"
> nr_feature_tokens = 6
> hidden_width = 64
> maxout_pieces = 2
>
> [model.tok2vec]
> # ...
> ```
| Name | Type | Description |
| ------------------- | ------------------------------------------ | ----------- |
| `tok2vec` | [`Model`](https://thinc.ai/docs/api-model) | |
| `nr_feature_tokens` | int | |
| `hidden_width` | int | |
| `maxout_pieces` | int | |
| `use_upper` | bool | |
| `nO` | int | |
2020-07-28 21:33:52 +03:00
## Text classification architectures {#textcat source="spacy/ml/models/textcat.py"}
### spacy.TextCatEnsemble.v1 {#TextCatEnsemble}
### spacy.TextCatBOW.v1 {#TextCatBOW}
### spacy.TextCatCNN.v1 {#TextCatCNN}
### spacy.TextCatLowData.v1 {#TextCatLowData}
## Entity linking architectures {#entitylinker source="spacy/ml/models/entity_linker.py"}
### spacy.EntityLinker.v1 {#EntityLinker}