mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-01 19:53:06 +03:00
small fixes
This commit is contained in:
parent
06ef66fd73
commit
bd8f9b188b
|
@ -176,8 +176,8 @@ def CharacterEmbed(width: int, rows: int, nM: int, nC: int):
|
||||||
ensures that the final character is always in the last position, instead
|
ensures that the final character is always in the last position, instead
|
||||||
of being in an arbitrary position depending on the word length.
|
of being in an arbitrary position depending on the word length.
|
||||||
|
|
||||||
The characters are embedded in a embedding table with 256 rows, and the
|
The characters are embedded in a embedding table with a given number of rows,
|
||||||
vectors concatenated. A hash-embedded vector of the NORM of the word is
|
and the vectors concatenated. A hash-embedded vector of the NORM of the word is
|
||||||
also concatenated on, and the result is then passed through a feed-forward
|
also concatenated on, and the result is then passed through a feed-forward
|
||||||
network to construct a single vector to represent the information.
|
network to construct a single vector to represent the information.
|
||||||
|
|
||||||
|
|
|
@ -181,10 +181,10 @@ characters would be `"jumpping"`: 4 from the start, 4 from the end. This ensures
|
||||||
that the final character is always in the last position, instead of being in an
|
that the final character is always in the last position, instead of being in an
|
||||||
arbitrary position depending on the word length.
|
arbitrary position depending on the word length.
|
||||||
|
|
||||||
The characters are embedded in a embedding table with 256 rows, and the vectors
|
The characters are embedded in a embedding table with a given number of rows,
|
||||||
concatenated. A hash-embedded vector of the `NORM` of the word is also
|
and the vectors concatenated. A hash-embedded vector of the `NORM` of the word
|
||||||
concatenated on, and the result is then passed through a feed-forward network to
|
is also concatenated on, and the result is then passed through a feed-forward
|
||||||
construct a single vector to represent the information.
|
network to construct a single vector to represent the information.
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
|
|
@ -683,7 +683,7 @@ You can also implement your own batch size schedule to use during training. The
|
||||||
import spacy
|
import spacy
|
||||||
|
|
||||||
@spacy.registry.schedules("my_custom_schedule.v1")
|
@spacy.registry.schedules("my_custom_schedule.v1")
|
||||||
def my_custom_schedule(start: int = 1, factor: int = 1.001):
|
def my_custom_schedule(start: int = 1, factor: float = 1.001):
|
||||||
while True:
|
while True:
|
||||||
yield start
|
yield start
|
||||||
start = start * factor
|
start = start * factor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user