class_docstr: 支持将多个 embedding 集合成一个 embedding。
  
  Example::
  
      >>> from fastNLP import Vocabulary
      >>> from fastNLP.embeddings.torch import StaticEmbedding, StackEmbedding
      >>> vocab =  Vocabulary().add_word_lst("The whether is good .".split())
      >>> embed_1 = StaticEmbedding(vocab, model_dir_or_name='en-glove-6b-50d', requires_grad=True)
      >>> embed_2 = StaticEmbedding(vocab, model_dir_or_name='en-word2vec-300', requires_grad=True)
      >>> embed = StackEmbedding([embed_1, embed_2])
  
  :param embeds: 一个由若干个 :class:`~fastNLP.embeddings.torch.embedding.TokenEmbedding` 组成的 :class:`list` ，要求
      每一个 ``TokenEmbedding`` 的词表都保持一致
  :param word_dropout: 按照一定概率随机将 word 设置为 ``unk_index`` ，这样可以使得 ``<UNK>`` 这个 token 得到足够的训练，
      且会对网络有一定的 regularize 作用。不同 embedidng 会在相同的位置被设置为 ``<UNK>`` 。 如果这里设置了 dropout，则
      组成的 embedding 就不要再设置 dropout 了。
  :param dropout: 以多大的概率对 embedding 的表示进行 Dropout。0.1 即随机将 10% 的值置为 0。
class_docstr_tok: ["\u652f\u6301\u5c06\u591a\u4e2a","embedding","\u96c6\u5408\u6210\u4e00\u4e2a","embedding\u3002","Example",":",":",">",">",">","from","fastNLP","import","Vocabulary",">",">",">","from","fastNLP.embeddings.torch","import","StaticEmbedding",",","StackEmbedding",">",">",">","vocab","=","Vocabulary","(",")",".add_word_lst","(","``","The","whether","is","good",".","``",".split","(",")",")",">",">",">","embed_1","=","StaticEmbedding","(","vocab",",","model_dir_or_name='en-glove-6b-50d","'",",","requires_grad=True",")",">",">",">","embed_2","=","StaticEmbedding","(","vocab",",","model_dir_or_name='en-word2vec-300","'",",","requires_grad=True",")",">",">",">","embed","=","StackEmbedding","(","[","embed_1",",","embed_2","]",")",":","param","embeds",":","\u4e00\u4e2a\u7531\u82e5\u5e72\u4e2a",":","class",":","`","~fastNLP.embeddings.torch.embedding.TokenEmbedding","`","\u7ec4\u6210\u7684",":","class",":","`","list","`","\uff0c\u8981\u6c42","\u6bcf\u4e00\u4e2a","``","TokenEmbedding","``","\u7684\u8bcd\u8868\u90fd\u4fdd\u6301\u4e00\u81f4",":","param","word_dropout",":","\u6309\u7167\u4e00\u5b9a\u6982\u7387\u968f\u673a\u5c06","word","\u8bbe\u7f6e\u4e3a","``","unk_index","``","\uff0c\u8fd9\u6837\u53ef\u4ee5\u4f7f\u5f97","``","<","UNK",">","``","\u8fd9\u4e2a","token","\u5f97\u5230\u8db3\u591f\u7684\u8bad\u7ec3\uff0c","\u4e14\u4f1a\u5bf9\u7f51\u7edc\u6709\u4e00\u5b9a\u7684","regularize","\u4f5c\u7528\u3002\u4e0d\u540c","embedidng","\u4f1a\u5728\u76f8\u540c\u7684\u4f4d\u7f6e\u88ab\u8bbe\u7f6e\u4e3a","``","<","UNK",">","``","\u3002","\u5982\u679c\u8fd9\u91cc\u8bbe\u7f6e\u4e86","dropout\uff0c\u5219","\u7ec4\u6210\u7684","embedding","\u5c31\u4e0d\u8981\u518d\u8bbe\u7f6e","dropout","\u4e86\u3002",":","param","dropout",":","\u4ee5\u591a\u5927\u7684\u6982\u7387\u5bf9","embedding","\u7684\u8868\u793a\u8fdb\u884c","Dropout\u30020.1","\u5373\u968f\u673a\u5c06","10","%","\u7684\u503c\u7f6e\u4e3a","0\u3002"]
docstr: 该 Embedding 输出的 vector 的最后一维的维度。
docstr_tok: ["\u8be5","Embedding","\u8f93\u51fa\u7684","vector","\u7684\u6700\u540e\u4e00\u7ef4\u7684\u7ef4\u5ea6\u3002"]
code: def embed_size(self):
      r"""
      该 Embedding 输出的 vector 的最后一维的维度。
      """
      return self._embed_size
  
file_path: fastNLP/fastNLP/embeddings/torch/stack_embedding.py
imports: from typing import List
  from ...envs.imports import _NEED_IMPORT_TORCH
  from .embedding import TokenEmbedding
  from .utils import _check_vocab_has_same_index
label_desc: Use image node_id 4 for calling the StackEmbedding obj's underlying member method code with example usage: obj.embed_size() and returns: self