anchor.diff:              if bias then r.hidden <- r.hidden + b.value
               r.hidden <- nonlinearity r.hidden
               output.[i] <- r.hidden
  -        dsharp.stack output
  +        let output = dsharp.stack output
  +        if batchFirst then output.transpose(0, 1) else output
   
   
  -type RNN(inFeatures, outFeatures, ?nonlinearity, ?numLayers, ?bias, ?dropout, ?bidirectional) =
  +type RNN(inFeatures, outFeatures, ?numLayers, ?nonlinearity, ?bias, ?batchFirst, ?dropout, ?bidirectional) =
       inherit Model()
       let numLayers = defaultArg numLayers 1
       let dropout = defaultArg dropout 0.
       let bidirectional = defaultArg bidirectional false
  +    let batchFirst = defaultArg batchFirst false
       let numDirections = if bidirectional then 2 else 1
       let makeLayers () = Array.init numLayers (fun i -> if i = 0 then RNNCell(inFeatures, outFeatures, ?nonlinearity=nonlinearity, ?bias=bias) else RNNCell(outFeatures, outFeatures, ?nonlinearity=nonlinearity, ?bias=bias))
       let layers = makeLayers()
  
positive.code:                 dsharp.cat([hFwd; hRev], 2)
              else hFwd
          r.hidden <- dsharp.stack(newhs)
          output
  
  
  let rnn = RNN(32, 10, bidirectional=true)
  let x = dsharp.randn([4; 16; 32])
  print rnn.hidden.shape
  let h = x --> rnn
  print rnn.hidden.shape
  print h.shape 
  // rnn.reset()
  
  // print rnn.hidden.shape
  // let h2 = x --> rnn
  // print rnn.hidden.shape
  
negative.code:     let hs = Parameter <| dsharp.tensor([])
      do 
          base.add(layers |> Array.map box, Array.init numLayers (fun i -> sprintf "RNN-layer-%A" i))
          if bidirectional then base.add(layersReverse |> Array.map box, Array.init numLayers (fun i -> sprintf "RNN-layer-reverse-%A" i))
          if dropout > 0. then base.add([dropoutLayer], ["RNN-dropout"])
  
      member _.hidden
  