class_docstr: Fully-connected LSTM layer with peephole connections.
  
  This is a fully-connected LSTM layer with peephole connections as a chain.
  Unlike the :class:`~chainer.links.LSTM` link, this chain holds ``peep_i``,
  ``peep_f`` and ``peep_o`` as child links besides ``upward`` and
  ``lateral``.
  
  Given a input vector :math:`x`, Peephole returns the next hidden vector
  :math:`h'` defined as
  
  .. math::
  
     a &=& \tanh(upward x + lateral h), \\
     i &=& \sigma(upward x + lateral h + peep_i c), \\
     f &=& \sigma(upward x + lateral h + peep_f c), \\
     c' &=& a \odot i + f \odot c, \\
     o &=& \sigma(upward x + lateral h + peep_o c'), \\
     h' &=& o \tanh(c'),
  
  where :math:`\sigma` is the sigmoid function, :math:`\odot` is the
  element-wise product, :math:`c` is the current cell state, :math:`c'`
  is the next cell state and :math:`h` is the current hidden vector.
  
  Args:
      in_size(int): Dimension of the input vector :math:`x`.
      out_size(int): Dimension of the hidden vector :math:`h`.
  
  Attributes:
      upward (~chainer.links.Linear): Linear layer of upward connections.
      lateral (~chainer.links.Linear): Linear layer of lateral connections.
      peep_i (~chainer.links.Linear): Linear layer of peephole connections
                                      to the input gate.
      peep_f (~chainer.links.Linear): Linear layer of peephole connections
                                      to the forget gate.
      peep_o (~chainer.links.Linear): Linear layer of peephole connections
                                      to the output gate.
      c (~chainer.Variable): Cell states of LSTM units.
      h (~chainer.Variable): Output at the current time step.
class_docstr_tok: ["Fully-connected","LSTM","layer","with","peephole","connections",".","This","is","a","fully-connected","LSTM","layer","with","peephole","connections","as","a","chain",".","Unlike","the",":","class",":","`","~chainer.links.LSTM","`","link",",","this","chain","holds","``","peep_i","``",",","``","peep_f","``","and","``","peep_o","``","as","child","links","besides","``","upward","``","and","``","lateral","``",".","Given","a","input","vector",":","math",":","`","x","`",",","Peephole","returns","the","next","hidden","vector",":","math",":","`","h","'","`","defined","as","..","math",":",":","a","&","=","&","\\tanh","(","upward","x","+","lateral","h",")",",","\\\\","i","&","=","&","\\sigma","(","upward","x","+","lateral","h","+","peep_i","c",")",",","\\\\","f","&","=","&","\\sigma","(","upward","x","+","lateral","h","+","peep_f","c",")",",","\\\\","c","'","&","=","&","a","\\odot","i","+","f","\\odot","c",",","\\\\","o","&","=","&","\\sigma","(","upward","x","+","lateral","h","+","peep_o","c","'",")",",","\\\\","h","'","&","=","&","o","\\tanh","(","c","'",")",",","where",":","math",":","`","\\sigma","`","is","the","sigmoid","function",",",":","math",":","`","\\odot","`","is","the","element-wise","product",",",":","math",":","`","c","`","is","the","current","cell","state",",",":","math",":","`","c","'","`","is","the","next","cell","state","and",":","math",":","`","h","`","is","the","current","hidden","vector",".","Args",":","in_size","(","int",")",":","Dimension","of","the","input","vector",":","math",":","`","x","`",".","out_size","(","int",")",":","Dimension","of","the","hidden","vector",":","math",":","`","h","`",".","Attributes",":","upward","(","~chainer.links.Linear",")",":","Linear","layer","of","upward","connections",".","lateral","(","~chainer.links.Linear",")",":","Linear","layer","of","lateral","connections",".","peep_i","(","~chainer.links.Linear",")",":","Linear","layer","of","peephole","connections","to","the","input","gate",".","peep_f","(","~chainer.links.Linear",")",":","Linear","layer","of","peephole","connections","to","the","forget","gate",".","peep_o","(","~chainer.links.Linear",")",":","Linear","layer","of","peephole","connections","to","the","output","gate",".","c","(","~chainer.Variable",")",":","Cell","states","of","LSTM","units",".","h","(","~chainer.Variable",")",":","Output","at","the","current","time","step","."]
docstr: Resets the internal states.
  
  It sets ``None`` to the :attr:`c` and :attr:`h` attributes.
docstr_tok: ["Resets","the","internal","states",".","It","sets","``","None","``","to","the",":","attr",":","`","c","`","and",":","attr",":","`","h","`","attributes","."]
code: def reset_state(self):
      """Resets the internal states.
  
      It sets ``None`` to the :attr:`c` and :attr:`h` attributes.
  
      """
      self.c = self.h = None
  
file_path: chainer/chainer/links/rnn/peephole.py
imports: import chainer
  from chainer.functions.activation import sigmoid
  from chainer.functions.activation import tanh
  from chainer.functions.array import reshape
  from chainer.functions.array import split_axis
  from chainer import link
  from chainer.links.connection import linear
  from chainer import variable
label_desc: Use image node_id 3 for calling the StatefulPeepholeLSTM obj's underlying member method code with example usage: obj.reset_state() without return types