class_docstr: Efficient linear layer for one-hot input.
  
  This is a link that wraps the :func:`~chainer.functions.embed_id` function.
  This link holds the ID (word) embedding matrix ``W`` as a parameter.
  
  Args:
      in_size (int): Number of different identifiers (a.k.a. vocabulary size).
      out_size (int): Output dimension.
      initialW (Initializer): Initializer to initialize the weight.
      ignore_label (int): If `ignore_label` is an int value, i-th column of
          return value is filled with 0.
  
  .. rubric:: :func:`~chainer.functions.embed_id`
  
  Attributes:
      W (~chainer.Variable): Embedding parameter matrix.
  
  Examples:
  
      >>> W = np.array([[0, 0, 0],
      ...               [1, 1, 1],
      ...               [2, 2, 2]]).astype('f')
      >>> W
      array([[ 0.,  0.,  0.],
             [ 1.,  1.,  1.],
             [ 2.,  2.,  2.]], dtype=float32)
      >>> l = L.EmbedID(W.shape[0], W.shape[1], initialW=W)
      >>> x = np.array([2, 1]).astype('i')
      >>> x
      array([2, 1], dtype=int32)
      >>> y = l(x)
      >>> y.data
      array([[ 2.,  2.,  2.],
             [ 1.,  1.,  1.]], dtype=float32)
class_docstr_tok: ["Efficient","linear","layer","for","one-hot","input",".","This","is","a","link","that","wraps","the",":","func",":","`","~chainer.functions.embed_id","`","function",".","This","link","holds","the","ID","(","word",")","embedding","matrix","``","W","``","as","a","parameter",".","Args",":","in_size","(","int",")",":","Number","of","different","identifiers","(","a.k.a",".","vocabulary","size",")",".","out_size","(","int",")",":","Output","dimension",".","initialW","(","Initializer",")",":","Initializer","to","initialize","the","weight",".","ignore_label","(","int",")",":","If","`","ignore_label","`","is","an","int","value",",","i-th","column","of","return","value","is","filled","with","0",".","..","rubric",":",":",":","func",":","`","~chainer.functions.embed_id","`","Attributes",":","W","(","~chainer.Variable",")",":","Embedding","parameter","matrix",".","Examples",":",">",">",">","W","=","np.array","(","[","[","0",",","0",",","0","]",",","...","[","1",",","1",",","1","]",",","...","[","2",",","2",",","2","]","]",")",".astype","(","'","f","'",")",">",">",">","W","array","(","[","[","0.",",","0.",",","0",".","]",",","[","1.",",","1.",",","1",".","]",",","[","2.",",","2.",",","2",".","]","]",",","dtype=float32",")",">",">",">","l","=","L.EmbedID","(","W.shape","[","0","]",",","W.shape","[","1","]",",","initialW=W",")",">",">",">","x","=","np.array","(","[","2",",","1","]",")",".astype","(","'","i","'",")",">",">",">","x","array","(","[","2",",","1","]",",","dtype=int32",")",">",">",">","y","=","l","(","x",")",">",">",">","y.data","array","(","[","[","2.",",","2.",",","2",".","]",",","[","1.",",","1.",",","1",".","]","]",",","dtype=float32",")"]
docstr: Extracts the word embedding of given IDs.
  
  Args:
      x (chainer.Variable): Batch vectors of IDs.
  
  Returns:
      chainer.Variable: Batch of corresponding embeddings.
docstr_tok: ["Extracts","the","word","embedding","of","given","IDs",".","Args",":","x","(","chainer.Variable",")",":","Batch","vectors","of","IDs",".","Returns",":","chainer.Variable",":","Batch","of","corresponding","embeddings","."]
code: def __call__(self, x):
      """Extracts the word embedding of given IDs.
  
      Args:
          x (chainer.Variable): Batch vectors of IDs.
  
      Returns:
          chainer.Variable: Batch of corresponding embeddings.
  
      """
      return embed_id(x, self.W, ignore_label=self.ignore_label)
  
imports: import chainer
  import numpy
  from chainer import cuda, function_node, link, variable
  from chainer.initializers import normal
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the EmbedID obj's underlying member method code with example usage: obj.__call__(x) and returns: embed_id