#NEWLINE# def init_buffers( self , inputs ) : #NEWLINE# #INDENT# '\n        Initialize buffers for recurrent internal units and outputs.\n        Buffers are initialized as 2D tensors with second dimension being steps * batch_size\n        A list of views are created on the buffer for easy manipulation of data\n        related to a certain time step\n\n        Arguments:\n            inputs (Tensor): input data as 2D tensor. The dimension is\n                             (input_size, sequence_length * batch_size)\n\n        ' #NEWLINE# if self . split_inputs : #NEWLINE# #INDENT# self . x_f = inputs [ : self . i_shape [ 0 ] ] #NEWLINE# self . x_b = inputs [ self . i_shape [ 0 ] : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . x_f = inputs #NEWLINE# self . x_b = inputs #NEWLINE# #UNINDENT# self . xs_f = get_steps ( self . x_f , self . i_shape ) #NEWLINE# self . xs_b = get_steps ( self . x_b , self . i_shape ) #NEWLINE# for buf in self . bufs_to_reset : #NEWLINE# #INDENT# buf [ : ] = 0