Menu

GBLearn2 datasources problem(dsource-image)

2008-08-03
2012-11-08
  • Serg Buslovsky

    Serg Buslovsky - 2008-08-03

    Hi, All.

    I'm trying to use GBLearn2 library for OCR.

    So I've got the training working correctly with MNIST-formatted database(using the dsource-mnist class provided in the demo).
    But got some problems with the testing stuff:
    I'm trying to use dsource-image class for loading the test samples:
    ;; construct the datasource
    (defvar datasource (new dsource-image 0 0.01) )
    (defvar files_list (list))
    (defvar labels_list (list))
    (for (i 6 (length argv))
    (progn
    (setq files_list (list-merge files_list (list (concat-fname (nth argv i)))))
    (setq labels_list (list-merge labels_list (list i)))
    ))
    (==> datasource load-pgms files_list labels_list)
    But when I do
    (==> thetrainer test-sample datasource testmeter 1)
    i'm getting:
    *** lisp_c runtime error: Index dimension does not match size and step
    ** in: C_fprop_C_c_layer
    ** in: C_fprop_C_net_cscscf
    ** in: C_fprop_C_idx3_supervised_module

    *** ==> : Run-time error in compiled code

    It looks like dsource-image is returning the data in some incorrect format.

    Any ideas?

     
    • Serg Buslovsky

      Serg Buslovsky - 2008-08-04

      Figured out that I'm passing the wrong testingdb datasource class(dsource-image), changed to dsource-idx3l-narrow build around dsource-image.
      However it still crashes with the same error.
      The code:
      (defvar datasource (new dsource-image 0 0.01) )
      (defvar files_list (list))
      (defvar labels_list (list))
      (for (i 6 (length argv))
      (progn
      (setq files_list (list-merge files_list (list (concat-fname (nth argv i)))))
      (setq labels_list (list-merge labels_list (list i)))
      ))
      (==> datasource load-pgms files_list labels_list)

        \(defvar datasource\_idx3l
          \(new dsource-idx3l-narrow datasource \(length files\_list\) 0\)\)
      
        ;;
        \(==> thetrainer test-sample datasource\_idx3l testmeter 1\)
      

      Eror:
      *** lisp_c runtime error: Index dimension does not match size and step
      ** in: C_fprop_C_c_layer
      ** in: C_fprop_C_net_cscscf
      ** in: C_fprop_C_idx3_supervised_module

      *** ==> : Run-time error in compiled code

       

Log in to post a comment.