Model Architecture #11356
-
Hi is there a way to view the layers present in a spacy model (en_core_web_sm). So my question is, In pytorch the following statement |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @rkoystart , you can use something like import spacy
nlp = spacy.load("en_core_web_lg")
for pipe in nlp.pipe_names:
print(nlp.get_pipe_config(pipe)) You can then cross-reference them with the architectures in the spaCy documentation. Note that a spaCy pipeline will not always contain only neural models, so this method is not exactly a one-to-one comparison with pytorch (that gives you the layers). |
Beta Was this translation helpful? Give feedback.
Hi @rkoystart , you can use something like
nlp.pipe_names
to see the components that underlie a particular spaCy model. You can couple this withnlp.get_pipe_config
to see how that particular component was configured. For example:You can then cross-reference them with the architectures in the spaCy documentation. Note that a spaCy pipeline will not always contain only neural models, so this method is not exactly a one-to-one comparison with pytorch (that gives you the layers).