Browse Source

Update embedding.py

tags/v0.4.10
zide05 GitHub 6 years ago
parent
commit
7fe4223d10
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      fastNLP/embeddings/embedding.py

+ 1
- 0
fastNLP/embeddings/embedding.py View File

@@ -20,6 +20,7 @@ class Embedding(nn.Module):
Example::

>>> import numpy as np
>>> from fastNLP.embeddings import Embedding
>>> init_embed = (2000, 100)
>>> embed = Embedding(init_embed) # 随机初始化一个具有2000个词,每个词表示为100维的词向量
>>> init_embed = np.zeros((2000, 100))


Loading…
Cancel
Save