anchor.diff:                                                  DumpPrefix         = None
                                                   MaxIters           = Some 300
                                                   }
  -        //let trnErr,valErr,tstErr = classificationErrors  batchSize data pred_fun
  -        //printfn"Classification errors before training:"
  -        //printfn "Train Error = %f%%, Validation Error = %f%%, Test Error =%f%% " (trnErr*100.0f) (valErr*100.0f) (tstErr*100.0f)
  +        let trnErr,valErr,tstErr = classificationErrors  batchSize data pred_fun
  +        printfn "Classification errors before training:"
  +        printfn "Train Error = %f%%, Validation Error = %f%%, Test Error =%f%% " (trnErr*100.0f) (valErr*100.0f) (tstErr*100.0f)
           let result = Train.train trainable data trainCfg
           //printfn "Training Time: %A" sw.Elapsed
           
  
positive.code:         let softmax act = exp act / (Expr.sumKeepingAxis 1 (exp act) + 1e-3f)
          
  //        let pred = softmax pred + 1e-3f
          let pred = pred|> Expr.dump "pred"
          let pred = pred |> Expr.checkFinite "pred"
  //        let loss = -target * log pred |> Expr.sumAxis 0 |> Expr.mean
  //        let loss = loss |> Expr.dump "loss"
  
negative.code:             tempAry
          else ary
  
      /// Calculates the number of errors in one batch             
      let batchClassificationErrors batchSize (modelPred: ArrayNDT<single> -> ArrayNDT<single>) (input:ArrayNDT<single>) (target:ArrayNDT<single>) =
          let pred = modelPred input |> aryToHost
          let targ = target |> aryToHost
          let predClass = maxPositionAxis 1 pred
          let targetClass = maxPositionAxis 1 targ
  
          ArrayND.map2 (fun a b -> if a = b then 0.0f else 1.0f) predClass targetClass 
          |> ArrayND.sum
          |> ArrayND.value
  
  
      ///Calculates the number of errors in one dataset
      let setClassificationErrors batchSize (modelPred: ArrayNDT<single> -> ArrayNDT<single>) (inSeq: seq<CsvLoader.CsvSample>) =
          inSeq
          |>Seq.map (fun {Input = inp; Target = trg} -> 
                      batchClassificationErrors batchSize modelPred inp trg)
          |>Seq.sum
  
      ///Calculates the fraction of errors for train-, validation- and test-dataset
      let classificationErrors batchSize (dataset:TrnValTst<CsvLoader.CsvSample>) (modelPred: ArrayNDT<single> -> ArrayNDT<single>) =
          let trnBatches = dataset.Trn.Batches batchSize 
          let valBatches = dataset.Val.Batches batchSize 
          let tstBatches = dataset.Tst.Batches batchSize 
          let trnError = setClassificationErrors batchSize modelPred trnBatches  / (single dataset.Trn.NSamples)
          let valError = setClassificationErrors batchSize modelPred valBatches  / (single dataset.Val.NSamples)                
          let tstError = setClassificationErrors batchSize modelPred tstBatches  / (single dataset.Tst.NSamples)
          trnError,valError,tstError
  
      ///classification on abalone dataset using a single GPTransfer Unit
  