How to change scorer to Softmax in spancat? #11813
Answered
by
ljvmiranda921
jamnicki
asked this question in
Help: Coding & Implementations
-
How to change scorer to Softmax in default spancat config? ...
[components.spancat.model.scorer]
- @layers = "spacy.LinearLogistic.v1"
- nO = null
- nI = null
+ @layers = "Softmax.v2"
... Above change return following error message. SystemError: <method '__getitem__' of 'dict' objects> returned a result with an error set Originally posted by @jamnicki in #11144 (reply in thread) |
Beta Was this translation helpful? Give feedback.
Answered by
ljvmiranda921
Nov 17, 2022
Replies: 1 comment 3 replies
-
Hi @jamnicki , I think you need to do it this way: ...
[model]
@architectures = "spacy.SpanCategorizer.v1"
- scorer = {"@layers": "spacy.LinearLogistic.v1"}
+ scorer = {"@layers": "Softmax.v2"}
... You can set it under the
So overall, your config may look like this:
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jamnicki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jamnicki ,
I think you need to do it this way:
You can set it under the
model
group and put it inside thescorer
parameter (notice how the@layers
is enclosed like a dictionary). You might also need to set individual parameters forSoftmax.v2
:So overall, your config may look like this: