er_ll :: (IsString a, Monoid a, ?dbnSizes :: [Int], ?numEpochs :: Int) => String -> a
run_trainer_ll outputFilepath = 
    let dbnsizes = ?dbnSizes
        numepochs = ?numEpochs :: Int
    in [str| 
function run_trainer_ll(train_x, train_y)
    dbn.sizes = $:dbnsizes$;
    opts.numepochs = [$:numepochs$];
    opts.batchsize = 100;
    opts.momentum  =   0;
    opts.alpha     =   1;
    dbn = dbnsetup(dbn, train_x, opts);
    dbn = dbntrain(dbn, train_x, opts);
    nn_ll = dbnunfoldtonn(dbn, 1);
    opts.numepochs =   1;
    opts.batchsize = 100;
    nn_ll = nntrain(nn_ll, train_x, train_y, opts);
    nnsave_to_file_full(nn_ll,'$fromString outputFilepath$');
    
end; |]

run_tra
run_trainer_ll :: (IsString a, Monoid a, ?dbnSizes :: [Int], ?numEpochs :: Int) => String -> a
run_trainer_ll outputFilepath = 
    let dbnsizes = ?dbnSizes
        numepochs = ?numEpochs :: Int
    in [str| 
function run_trainer_ll(train_x, train_y)
    dbn.sizes = $:dbnsizes$;
    opts.numepochs = [$:numepochs$];
    opts.batchsize = 100;
    opts.momentum  =   0;
    opts.alpha     =   1;
    dbn = dbnsetup(dbn, train_x, opts);
    dbn = dbntrain(dbn, train_x, opts);
    nn_ll = dbnunfoldtonn(dbn, 1);
    opts.numepochs =   1;
    opts.batchsize = 100;
    nn_ll = nntrain(nn_ll, train_x, train_y, opts);
    nnsave_to_file_full(nn_ll,'$fromString outputFilepath$');
    
end; |]
run_trainer_ll outputFilepath = 
    let dbnsizes = ?dbnSizes
        numepochs = ?numEpochs :: Int
    in [str| 
function run_trainer_ll(train_x, train_y)
    dbn.sizes = $:dbnsizes$;
    opts.numepochs = [$:numepochs$];
    opts.batchsize = 100;
    opts.momentum  =   0;
    opts.alpha     =   1;
    dbn = dbnsetup(dbn, train_x, opts);
    dbn = dbntrain(dbn, train_x, opts);
    nn_ll = dbnunfoldtonn(dbn, 1);
    opts.numepochs =   1;
    opts.batchsize = 100;
    nn_ll = nntrain(nn_ll, train_x, train_y, opts);
    nnsave_to_file_full(nn_ll,'$fromString outputFilepath$');
    
end; |]