anchor.diff:          r.hidden <- dsharp.stack(newhs)
           if batchFirst then output.transpose(0, 1) else output
   
  -
  -// let rnn = RNN(32, 10, bidirectional=true, numLayers=2, bias=false, dropout=0.3)
  -// let x = dsharp.randn([4; 16; 32])
  -// print rnn.hidden.shape
  -// let h = x --> rnn
  -// print rnn.hidden.shape
  -// print h.shape 
  -// rnn.reset()
  -
   let text = "A merry little surge of electricity piped by automatic alarm from the mood organ beside his bed awakened Rick Deckard."
   
   type TextTokenizer(?example) = 
  
positive.code: let seqLen = 32
  let tok = TextTokenizer(text)
  let dataset = tok.dataset(text, seqLen)
  let loader = dataset.loader(batchSize=4)
  
  let rnn = RNN(tok.length, 512, numLayers=2, batchFirst=true)
  let net =
  
negative.code:             with
              | _ -> failwithf "Given char '%A' is not a part of this tokenizer %A" c chars
          i
      member t.textToIndices(text:string) = text |> Seq.map t.charToIndex |> Seq.toArray
      member t.indicesToTensor(indices) = indices |> Array.map (fun i -> dsharp.onehot(t.length, i)) |> dsharp.stack
      member t.indexToChar(index) = chars.[index]
      member t.textToTensor(texts:string[]) = texts |> Array.map (t.textToIndices >> t.indicesToTensor) |> dsharp.stack
      member t.tensorToText(tensor:Tensor) =
          if tensor.dim <> 3 then failwithf "Expecting a 3d tensor with shape batchSize x seqLen x features, received tensor with shape %A" tensor.shape 
          let t2text (tens:Tensor) = [|for i in 0..tens.shape.[0]-1 do tens.[i].argmax().[0]|] |> Array.map t.indexToChar |> System.String |> string
          [|for i in 0..tensor.shape.[0]-1 do tensor.[i] |> t2text|]
      member t.dataset(text:string, seqLength) =
          if seqLength > text.Length then failwithf "Expecting text.Length (%A) >= seqLength (%A)" text.Length seqLength
          let sequences = [|for i in 0..(text.Length - seqLength + 1)-1 do text.Substring(i, seqLength)|] |> Array.map t.textToIndices
  