class_docstr: MKL Backend
class_docstr_tok: ["MKL","Backend"]
docstr: Time step unrolling portion of recurrent layer fprop.
  
  Arguments:
      W_recur (Tensor): Recurrent weight matrix.
      h_prev_s (Array): Array of per time step hidden state tensors. Each
          element in the array is a single time step view into one tensor
          containing all of the time steps in sequence.
      h_ff_s (Array): Array of per time step hidden state tensors. Each
          element in the array is a single time step view into one tensor
          containing all of the time steps in sequence.
      h_s (Array): Array of per time step hidden state tensors. Each
          element in the array is a single time step view into one tensor
          containing all of the time steps in sequence.
      bias (Tensor): Bias tensor to add at each time step.
      nout (integer): Number of output units for the layer.
      num_steps (integer): Total number of time steps in the buffer.
      num_used_steps (integer): Number of time steps being used for real
          data.
      activation (Transform): Activation function for the layer.
      reverse (boolean): When true, unrolling will iterate over time steps
          in reverse (for BiRNN).
docstr_tok: ["Time","step","unrolling","portion","of","recurrent","layer","fprop",".","Arguments",":","W_recur","(","Tensor",")",":","Recurrent","weight","matrix",".","h_prev_s","(","Array",")",":","Array","of","per","time","step","hidden","state","tensors",".","Each","element","in","the","array","is","a","single","time","step","view","into","one","tensor","containing","all","of","the","time","steps","in","sequence",".","h_ff_s","(","Array",")",":","Array","of","per","time","step","hidden","state","tensors",".","Each","element","in","the","array","is","a","single","time","step","view","into","one","tensor","containing","all","of","the","time","steps","in","sequence",".","h_s","(","Array",")",":","Array","of","per","time","step","hidden","state","tensors",".","Each","element","in","the","array","is","a","single","time","step","view","into","one","tensor","containing","all","of","the","time","steps","in","sequence",".","bias","(","Tensor",")",":","Bias","tensor","to","add","at","each","time","step",".","nout","(","integer",")",":","Number","of","output","units","for","the","layer",".","num_steps","(","integer",")",":","Total","number","of","time","steps","in","the","buffer",".","num_used_steps","(","integer",")",":","Number","of","time","steps","being","used","for","real","data",".","activation","(","Transform",")",":","Activation","function","for","the","layer",".","reverse","(","boolean",")",":","When","true",",","unrolling","will","iterate","over","time","steps","in","reverse","(","for","BiRNN",")","."]
code: def compound_rnn_unroll_fprop(
      self,
      W_recur,
      h_prev_s,
      h_ff_s,
      h_s,
      bias,
      nout,
      num_steps,
      num_used_steps,
      activation,
      reverse=False,
  ):
      """
      Time step unrolling portion of recurrent layer fprop.
  
      Arguments:
          W_recur (Tensor): Recurrent weight matrix.
          h_prev_s (Array): Array of per time step hidden state tensors. Each
              element in the array is a single time step view into one tensor
              containing all of the time steps in sequence.
          h_ff_s (Array): Array of per time step hidden state tensors. Each
              element in the array is a single time step view into one tensor
              containing all of the time steps in sequence.
          h_s (Array): Array of per time step hidden state tensors. Each
              element in the array is a single time step view into one tensor
              containing all of the time steps in sequence.
          bias (Tensor): Bias tensor to add at each time step.
          nout (integer): Number of output units for the layer.
          num_steps (integer): Total number of time steps in the buffer.
          num_used_steps (integer): Number of time steps being used for real
              data.
          activation (Transform): Activation function for the layer.
          reverse (boolean): When true, unrolling will iterate over time steps
              in reverse (for BiRNN).
      """
      if num_used_steps is not None and num_used_steps < num_steps:
          h_s = h_s[:num_used_steps]
          h_prev_s = h_prev_s[:num_used_steps]
          h_ff_s = h_ff_s[:num_used_steps]
  
      if reverse:
          steps = reversed(list(zip(h_s, h_prev_s, h_ff_s)))
      else:
          steps = zip(h_s, h_prev_s, h_ff_s)
  
      for h, h_prev, h_ff in steps:
          if h_ff is h:
              self.compound_dot(W_recur, h_prev, h, beta=1.0)
              h[:] = activation(h + bias)
          else:
              self.compound_dot(W_recur, h_prev, h)
              if not math_cpu.add_and_act(
                  h._tensor, h_ff._tensor, bias._tensor, activation
              ):
                  h[:] = activation(h + h_ff + bias)
  
imports: from __future__ import division
  from builtins import zip
  import logging
  from neon.backends import layer_mkl
  from neon.backends.util.check_mkl import get_mkl_lib
  from neon.backends.nervanacpu import CPUTensor, NervanaCPU, CustomNumpy
  import ctypes
  from cffi import FFI
  from ctypes import c_longlong, c_float, c_double, c_int
  import numpy
  from neon.backends import math_cpu
  from neon.backends.backend import OpTreeNode
  import os
  import sys
label_desc: Use image node_id 33 for calling the NervanaMKL obj's underlying member method code with example usage: obj.compound_rnn_unroll_fprop(W_recur, h_prev_s, h_ff_s, h_s, bias, nout, num_steps, num_used_steps, activation, reverse) without return types