;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "torch/torch-config")
(libload "torch/level2")


#? *** level3

;; dummy function that adds torch header files in C file
(eval `(de dummy_level3 () ,torch-cpheader-cmd ()))

#? * torch_diskhtkdataset
;;.TYPE CLASS
#? (new torch_diskhtkdataset <flag> <inputs_filenames> <one_file_is_one_sequence> <max_load> <targets_filename> <dictionary_> <words>>
#? (new torch_diskhtkdataset <flag> <inputs_filenames> <targets_filename> <n_files_> <one_file_is_one_sequence> <max_load> <dictionary_> <words>>
#? (==> <torch_diskhtkdataset> -destructor)

#? * torch_diskmatdataset
;;.TYPE CLASS
#? (new torch_diskmatdataset <flag> <filename> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_diskmatdataset <flag> <filenames> <n_files_> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_diskmatdataset <flag> <input_filenames> <target_filenames> <n_files_> <max_load> <binary_mode>>
#? (==> <torch_diskmatdataset> -destructor)

#? * torch_htkdataset
;;.TYPE CLASS
#? (new torch_htkdataset <flag> <inputs_filenames> <one_file_is_one_sequence> <max_load> <targets_filename> <dictionary_> <words>>
#? (new torch_htkdataset <flag> <inputs_filenames> <targets_filename> <n_files_> <one_file_is_one_sequence> <max_load> <dictionary_> <words>>
#? (==> <torch_htkdataset> -destructor)

#? * torch_matdataset
;;.TYPE CLASS
#? (new torch_matdataset <flag> <filename> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_matdataset <flag> <filenames> <n_files_> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_matdataset <flag> <input_filenames> <target_filenames> <n_files_> <max_load> <binary_mode>>
#? (==> <torch_matdataset> -destructor)

#? * torch_connectedmachine
;;.TYPE CLASS
#? (==> <torch_connectedmachine> get_machines)
#? (==> <torch_connectedmachine> set_machines <s>)
#? (==> <torch_connectedmachine> get_n_machines_on_layer)
#? (==> <torch_connectedmachine> set_n_machines_on_layer <s>)
#? (==> <torch_connectedmachine> get_n_layers)
#? (==> <torch_connectedmachine> set_n_layers <s>)
#? (new torch_connectedmachine <flag>>
#? (==> <torch_connectedmachine> addfcl <machine>)
#? (==> <torch_connectedmachine> addmachine <machine>)
#? (==> <torch_connectedmachine> connecton <machine>)
#? (==> <torch_connectedmachine> addlayer)
#? (==> <torch_connectedmachine> build)
#? (==> <torch_connectedmachine> reset)
#? (==> <torch_connectedmachine> iterinitialize)
#? (==> <torch_connectedmachine> forward <inputs>)
#? (==> <torch_connectedmachine> backward <inputs> <alpha>)
#? (==> <torch_connectedmachine> loadxfile <file>)
#? (==> <torch_connectedmachine> savexfile <file>)
#? (==> <torch_connectedmachine> setpartialbackprop <flag>)
#? (==> <torch_connectedmachine> -destructor)

#? * torch_criterion
;;.TYPE CLASS
#? (==> <torch_criterion> get_data)
#? (==> <torch_criterion> set_data <s>)
#? (new torch_criterion <flag> <n_inputs_> <n_params_>>
#? (==> <torch_criterion> setdataset <data_>)
#? (==> <torch_criterion> -destructor)

#? * torch_distribution
;;.TYPE CLASS
#? (==> <torch_distribution> get_log_probability)
#? (==> <torch_distribution> set_log_probability <s>)
#? (==> <torch_distribution> get_log_probabilities)
#? (==> <torch_distribution> set_log_probabilities <s>)
#? (new torch_distribution <flag> <n_inputs_> <n_params_>>
#? (==> <torch_distribution> logprobability <inputs>)
#? (==> <torch_distribution> viterbilogprobability <inputs>)
#? (==> <torch_distribution> framelogprobability <s> <f_inputs>)
#? (==> <torch_distribution> viterbiframelogprobability <s> <f_inputs>)
#? (==> <torch_distribution> framegenerate <s> <inputs>)
#? (==> <torch_distribution> frameexpectation <s> <inputs>)
#? (==> <torch_distribution> emiterinitialize)
#? (==> <torch_distribution> iterinitialize)
#? (==> <torch_distribution> emsequenceinitialize <inputs>)
#? (==> <torch_distribution> sequenceinitialize <inputs>)
#? (==> <torch_distribution> emaccposteriors <inputs> <log_posterior>)
#? (==> <torch_distribution> frameemaccposteriors <s> <f_inputs> <log_posterior>)
#? (==> <torch_distribution> viterbiaccposteriors <inputs> <log_posterior>)
#? (==> <torch_distribution> frameviterbiaccposteriors <s> <f_inputs> <log_posterior>)
#? (==> <torch_distribution> emupdate)
#? (==> <torch_distribution> decode <inputs>)
#? (==> <torch_distribution> forward <inputs>)
#? (==> <torch_distribution> emforward <inputs>)
#? (==> <torch_distribution> viterbiforward <inputs>)
#? (==> <torch_distribution> backward <inputs> <alpha>)
#? (==> <torch_distribution> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_distribution> viterbibackward <inputs> <alpha>)
#? (==> <torch_distribution> loadxfile <file>)
#? (==> <torch_distribution> -destructor)

#? * torch_exp
;;.TYPE CLASS
#? (new torch_exp <flag> <n_units>>
#? (==> <torch_exp> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_exp> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_exp> -destructor)

#? * torch_inputsselect
;;.TYPE CLASS
#? (==> <torch_inputsselect> get_offset)
#? (==> <torch_inputsselect> set_offset <s>)
#? (new torch_inputsselect <flag> <n_inputs_> <offset_> <n_selected_>>
#? (==> <torch_inputsselect> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_inputsselect> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_inputsselect> -destructor)

#? * torch_linear
;;.TYPE CLASS
#? (==> <torch_linear> get_weight_decay)
#? (==> <torch_linear> set_weight_decay <s>)
#? (==> <torch_linear> get_weights)
#? (==> <torch_linear> set_weights <s>)
#? (==> <torch_linear> get_bias)
#? (==> <torch_linear> set_bias <s>)
#? (==> <torch_linear> get_der_weights)
#? (==> <torch_linear> set_der_weights <s>)
#? (==> <torch_linear> get_der_bias)
#? (==> <torch_linear> set_der_bias <s>)
#? (==> <torch_linear> reset_)
#? (new torch_linear <flag> <n_inputs_> <n_outputs_>>
#? (==> <torch_linear> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_linear> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_linear> reset)
#? (==> <torch_linear> -destructor)

#? * torch_logmixer
;;.TYPE CLASS
#? (==> <torch_logmixer> get_n_experts)
#? (==> <torch_logmixer> set_n_experts <s>)
#? (new torch_logmixer <flag> <n_inputs_> <n_outputs_per_expert>>
#? (==> <torch_logmixer> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_logmixer> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_logmixer> -destructor)

#? * torch_logrbf
;;.TYPE CLASS
#? (==> <torch_logrbf> get_initial_kmeans_trainer)
#? (==> <torch_logrbf> set_initial_kmeans_trainer <s>)
#? (==> <torch_logrbf> get_initial_kmeans_dataset)
#? (==> <torch_logrbf> set_initial_kmeans_dataset <s>)
#? (new torch_logrbf <flag> <n_inputs_> <n_outputs_> <kmeans_trainer>>
#? (==> <torch_logrbf> setdataset <data_>)
#? (==> <torch_logrbf> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_logrbf> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_logrbf> -destructor)

#? * torch_logsigmoid
;;.TYPE CLASS
#? (==> <torch_logsigmoid> get_buff)
#? (==> <torch_logsigmoid> set_buff <s>)
#? (new torch_logsigmoid <flag> <n_units>>
#? (==> <torch_logsigmoid> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_logsigmoid> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_logsigmoid> -destructor)

#? * torch_logsoftmax
;;.TYPE CLASS
#? (new torch_logsoftmax <flag> <n_units>>
#? (==> <torch_logsoftmax> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_logsoftmax> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_logsoftmax> -destructor)

#? * torch_mixer
;;.TYPE CLASS
#? (==> <torch_mixer> get_n_experts)
#? (==> <torch_mixer> set_n_experts <s>)
#? (new torch_mixer <flag> <n_inputs_> <n_outputs_per_expert>>
#? (==> <torch_mixer> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_mixer> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_mixer> -destructor)

#? * torch_sigmoid
;;.TYPE CLASS
#? (new torch_sigmoid <flag> <n_units>>
#? (==> <torch_sigmoid> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_sigmoid> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_sigmoid> -destructor)

#? * torch_softmax
;;.TYPE CLASS
#? (==> <torch_softmax> get_shift)
#? (==> <torch_softmax> set_shift <s>)
#? (==> <torch_softmax> get_calc_shift)
#? (==> <torch_softmax> set_calc_shift <s>)
#? (new torch_softmax <flag> <n_units>>
#? (==> <torch_softmax> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_softmax> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_softmax> -destructor)

#? * torch_softplus
;;.TYPE CLASS
#? (new torch_softplus <flag> <n_units>>
#? (==> <torch_softplus> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_softplus> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_softplus> -destructor)

#? * torch_spatialconvolution
;;.TYPE CLASS
#? (==> <torch_spatialconvolution> get_k_w)
#? (==> <torch_spatialconvolution> set_k_w <s>)
#? (==> <torch_spatialconvolution> get_d_x)
#? (==> <torch_spatialconvolution> set_d_x <s>)
#? (==> <torch_spatialconvolution> get_d_y)
#? (==> <torch_spatialconvolution> set_d_y <s>)
#? (==> <torch_spatialconvolution> get_n_input_planes)
#? (==> <torch_spatialconvolution> set_n_input_planes <s>)
#? (==> <torch_spatialconvolution> get_n_output_planes)
#? (==> <torch_spatialconvolution> set_n_output_planes <s>)
#? (==> <torch_spatialconvolution> get_input_height)
#? (==> <torch_spatialconvolution> set_input_height <s>)
#? (==> <torch_spatialconvolution> get_input_width)
#? (==> <torch_spatialconvolution> set_input_width <s>)
#? (==> <torch_spatialconvolution> get_output_height)
#? (==> <torch_spatialconvolution> set_output_height <s>)
#? (==> <torch_spatialconvolution> get_output_width)
#? (==> <torch_spatialconvolution> set_output_width <s>)
#? (==> <torch_spatialconvolution> get_weights)
#? (==> <torch_spatialconvolution> set_weights <s>)
#? (==> <torch_spatialconvolution> get_der_weights)
#? (==> <torch_spatialconvolution> set_der_weights <s>)
#? (==> <torch_spatialconvolution> get_biases)
#? (==> <torch_spatialconvolution> set_biases <s>)
#? (==> <torch_spatialconvolution> get_der_biases)
#? (==> <torch_spatialconvolution> set_der_biases <s>)
#? (new torch_spatialconvolution <flag> <n_input_planes_> <n_output_planes_> <width_> <height_> <k_w_> <d_x_> <d_y_>>
#? (==> <torch_spatialconvolution> reset_)
#? (==> <torch_spatialconvolution> reset)
#? (==> <torch_spatialconvolution> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_spatialconvolution> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_spatialconvolution> -destructor)

#? * torch_spatialsubsampling
;;.TYPE CLASS
#? (==> <torch_spatialsubsampling> get_k_w)
#? (==> <torch_spatialsubsampling> set_k_w <s>)
#? (==> <torch_spatialsubsampling> get_d_x)
#? (==> <torch_spatialsubsampling> set_d_x <s>)
#? (==> <torch_spatialsubsampling> get_d_y)
#? (==> <torch_spatialsubsampling> set_d_y <s>)
#? (==> <torch_spatialsubsampling> get_n_input_planes)
#? (==> <torch_spatialsubsampling> set_n_input_planes <s>)
#? (==> <torch_spatialsubsampling> get_input_height)
#? (==> <torch_spatialsubsampling> set_input_height <s>)
#? (==> <torch_spatialsubsampling> get_input_width)
#? (==> <torch_spatialsubsampling> set_input_width <s>)
#? (==> <torch_spatialsubsampling> get_output_height)
#? (==> <torch_spatialsubsampling> set_output_height <s>)
#? (==> <torch_spatialsubsampling> get_output_width)
#? (==> <torch_spatialsubsampling> set_output_width <s>)
#? (==> <torch_spatialsubsampling> get_weights)
#? (==> <torch_spatialsubsampling> set_weights <s>)
#? (==> <torch_spatialsubsampling> get_der_weights)
#? (==> <torch_spatialsubsampling> set_der_weights <s>)
#? (==> <torch_spatialsubsampling> get_biases)
#? (==> <torch_spatialsubsampling> set_biases <s>)
#? (==> <torch_spatialsubsampling> get_der_biases)
#? (==> <torch_spatialsubsampling> set_der_biases <s>)
#? (new torch_spatialsubsampling <flag> <n_input_planes_> <width_> <height_> <k_w_> <d_x_> <d_y_>>
#? (==> <torch_spatialsubsampling> reset_)
#? (==> <torch_spatialsubsampling> reset)
#? (==> <torch_spatialsubsampling> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_spatialsubsampling> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_spatialsubsampling> -destructor)

#? * torch_summachine
;;.TYPE CLASS
#? (==> <torch_summachine> get_n_machines)
#? (==> <torch_summachine> set_n_machines <s>)
#? (new torch_summachine <flag> <n_units> <n_machines_>>
#? (==> <torch_summachine> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_summachine> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_summachine> -destructor)

#? * torch_tanh
;;.TYPE CLASS
#? (new torch_tanh <flag> <n_units>>
#? (==> <torch_tanh> frameforward <s> <f_inputs> <f_outputs>)
#? (==> <torch_tanh> framebackward <s> <f_inputs> <beta_> <f_outputs> <alpha_>)
#? (==> <torch_tanh> -destructor)

#? * torch_temporalconvolution
;;.TYPE CLASS
#? (==> <torch_temporalconvolution> get_k_w)
#? (==> <torch_temporalconvolution> set_k_w <s>)
#? (==> <torch_temporalconvolution> get_d_t)
#? (==> <torch_temporalconvolution> set_d_t <s>)
#? (==> <torch_temporalconvolution> get_weights)
#? (==> <torch_temporalconvolution> set_weights <s>)
#? (==> <torch_temporalconvolution> get_der_weights)
#? (==> <torch_temporalconvolution> set_der_weights <s>)
#? (==> <torch_temporalconvolution> get_biases)
#? (==> <torch_temporalconvolution> set_biases <s>)
#? (==> <torch_temporalconvolution> get_der_biases)
#? (==> <torch_temporalconvolution> set_der_biases <s>)
#? (new torch_temporalconvolution <flag> <input_frame_size> <output_frame_size> <k_w_> <d_t_>>
#? (==> <torch_temporalconvolution> reset_)
#? (==> <torch_temporalconvolution> reset)
#? (==> <torch_temporalconvolution> forward <inputs>)
#? (==> <torch_temporalconvolution> backward <inputs> <alpha>)
#? (==> <torch_temporalconvolution> -destructor)

#? * torch_temporalmean
;;.TYPE CLASS
#? (new torch_temporalmean <flag> <input_frame_size>>
#? (==> <torch_temporalmean> forward <inputs>)
#? (==> <torch_temporalmean> backward <inputs> <alpha>)
#? (==> <torch_temporalmean> -destructor)

#? * torch_temporalsubsampling
;;.TYPE CLASS
#? (==> <torch_temporalsubsampling> get_k_w)
#? (==> <torch_temporalsubsampling> set_k_w <s>)
#? (==> <torch_temporalsubsampling> get_d_t)
#? (==> <torch_temporalsubsampling> set_d_t <s>)
#? (==> <torch_temporalsubsampling> get_weights)
#? (==> <torch_temporalsubsampling> set_weights <s>)
#? (==> <torch_temporalsubsampling> get_der_weights)
#? (==> <torch_temporalsubsampling> set_der_weights <s>)
#? (==> <torch_temporalsubsampling> get_biases)
#? (==> <torch_temporalsubsampling> set_biases <s>)
#? (==> <torch_temporalsubsampling> get_der_biases)
#? (==> <torch_temporalsubsampling> set_der_biases <s>)
#? (new torch_temporalsubsampling <flag> <input_frame_size> <k_w_> <d_t_>>
#? (==> <torch_temporalsubsampling> reset_)
#? (==> <torch_temporalsubsampling> reset)
#? (==> <torch_temporalsubsampling> forward <inputs>)
#? (==> <torch_temporalsubsampling> backward <inputs> <alpha>)
#? (==> <torch_temporalsubsampling> -destructor)

#? * torch_svm
;;.TYPE CLASS
#? (==> <torch_svm> get_sv_allocator)
#? (==> <torch_svm> set_sv_allocator <s>)
#? (==> <torch_svm> get_io_sequence_array)
#? (==> <torch_svm> set_io_sequence_array <s>)
#? (==> <torch_svm> get_data)
#? (==> <torch_svm> set_data <s>)
#? (==> <torch_svm> get_kernel)
#? (==> <torch_svm> set_kernel <s>)
#? (==> <torch_svm> get_b)
#? (==> <torch_svm> set_b <s>)
#? (==> <torch_svm> get_support_vectors)
#? (==> <torch_svm> set_support_vectors <s>)
#? (==> <torch_svm> get_sv_alpha)
#? (==> <torch_svm> set_sv_alpha <s>)
#? (==> <torch_svm> get_sv_sequences)
#? (==> <torch_svm> set_sv_sequences <s>)
#? (==> <torch_svm> get_n_support_vectors)
#? (==> <torch_svm> set_n_support_vectors <s>)
#? (==> <torch_svm> get_n_support_vectors_bound)
#? (==> <torch_svm> set_n_support_vectors_bound <s>)
#? (new torch_svm <flag> <kernel_> <io_sequence_array_>>
#? (==> <torch_svm> bcompute)
#? (==> <torch_svm> forward <inputs>)
#? (==> <torch_svm> loadxfile <file>)
#? (==> <torch_svm> savexfile <file>)
#? (==> <torch_svm> -destructor)

#? * torch_svmcacheclassification
;;.TYPE CLASS
#? (==> <torch_svmcacheclassification> get_data)
#? (==> <torch_svmcacheclassification> set_data <s>)
#? (==> <torch_svmcacheclassification> get_y)
#? (==> <torch_svmcacheclassification> set_y <s>)
#? (new torch_svmcacheclassification <flag> <data_> <kernel_> <cache_size_in_megs_>>
#? (==> <torch_svmcacheclassification> getcolumn <index> <adr>)

#? * torch_svmcacheregression
;;.TYPE CLASS
#? (==> <torch_svmcacheregression> get_data)
#? (==> <torch_svmcacheregression> set_data <s>)
#? (==> <torch_svmcacheregression> get_n_examples)
#? (==> <torch_svmcacheregression> set_n_examples <s>)
#? (new torch_svmcacheregression <flag> <data_> <kernel_> <cache_size_in_megs_>>
#? (==> <torch_svmcacheregression> getcolumn <index> <adr>)

#? * torch_viterbitrainer
;;.TYPE CLASS
#? (new torch_viterbitrainer <flag> <distribution_>>
#? (==> <torch_viterbitrainer> train <data> <measurers>)
#? (==> <torch_viterbitrainer> test <measurers>)
#? (==> <torch_viterbitrainer> -destructor)

#? * torch_pipexfile
;;.TYPE CLASS
#? (new torch_pipexfile <flag> <command> <open_flags>>
#? (==> <torch_pipexfile> -destructor)

#? * (dummy_level3)

;; ********************************************************



;;class DiskHTKDataSet : public DiskDataSet
(defclass  torch_DiskHTKDataSet   torch_DiskDataSet)

;;(defmethod  torch_DiskHTKDataSet  torch_DiskHTKDataSet ( flag inputs_filenames  one_file_is_one_sequence  max_load  targets_filename  lex_  words )
;;  ((-bool-) flag)
  
;;  ((-gptr- "const char *") inputs_filenames)  
;;  ((-bool-) one_file_is_one_sequence)  
;;  ((-int-) max_load)  
;;  ((-gptr- "const char *") targets_filename)  
;;  ((-gptr- "Torch::LexiconInfo*") lex_)  
;;  ((-bool-) words)  
;;  #{ if($flag == false) {
;;            $shell_flag = false;
;;            $p = new Torch::DiskHTKDataSet($inputs_filenames  ,$one_file_is_one_sequence  ,$max_load  ,$targets_filename  ,$lex_  ,$words); 
;;     }
;;     else
;;            $shell_flag = true; 
;;  #} 
;;  ())

(defmethod  torch_DiskHTKDataSet  torch_DiskHTKDataSet ( flag inputs_filenames  targets_filename  n_files_  one_file_is_one_sequence  max_load  lex_  words )
  ((-bool-) flag)
  
  ((-gptr- "char **") inputs_filenames)  
  ((-gptr- "char **") targets_filename)  
  ((-int-) n_files_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-gptr- "Torch::LexiconInfo*") lex_)  
  ((-bool-) words)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::DiskHTKDataSet($inputs_filenames  ,$targets_filename  ,$n_files_  ,$one_file_is_one_sequence  ,$max_load  ,$lex_  ,$words); 
     }
     else 
            $shell_flag = true;
  #} 
  ())

(defmethod  torch_DiskHTKDataSet  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::DiskHTKDataSet *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class DiskMatDataSet : public DiskDataSet
(defclass  torch_DiskMatDataSet   torch_DiskDataSet)

(defmethod  torch_DiskMatDataSet  torch_DiskMatDataSet ( flag filename  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
  ((-bool-) flag)
  
  ((-gptr- "const char *") filename)  
  ((-int-) n_inputs_)  
  ((-int-) n_targets_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-bool-) binary_mode)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::DiskMatDataSet($filename  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_DiskMatDataSet  torch_DiskMatDataSet ( flag filenames  n_files_  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
  ((-bool-) flag)
  
  ((-gptr- "char **") filenames)  
  ((-int-) n_files_)  
  ((-int-) n_inputs_)  
  ((-int-) n_targets_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-bool-) binary_mode)  
  #{ if($flag == 0) {
            $shell_flag = 0;
            $p = new Torch::DiskMatDataSet($filenames  ,$n_files_  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
     }
  #} 
  ())

(defmethod  torch_DiskMatDataSet  torch_DiskMatDataSet ( flag input_filenames  target_filenames  n_files_  max_load  binary_mode )
  ((-bool-) flag)
  
  ((-gptr- "char **") input_filenames)  
  ((-gptr- "char **") target_filenames)  
  ((-int-) n_files_)  
  ((-int-) max_load)  
  ((-bool-) binary_mode)  
  #{ if($flag == 0) {
            $shell_flag = 0;
            $p = new Torch::DiskMatDataSet($input_filenames  ,$target_filenames  ,$n_files_  ,$max_load  ,$binary_mode); 
     }
  #} 
  ())

(defmethod  torch_DiskMatDataSet  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::DiskMatDataSet *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class HTKDataSet : public MemoryDataSet
(defclass  torch_HTKDataSet   torch_MemoryDataSet)

(defmethod  torch_HTKDataSet  torch_HTKDataSet ( flag inputs_filenames  one_file_is_one_sequence  max_load  targets_filename  lex_  words )
  ((-bool-) flag)
  
  ((-gptr- "const char *") inputs_filenames)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-gptr- "const char *") targets_filename)  
  ((-gptr- "Torch::LexiconInfo*") lex_)  
  ((-bool-) words)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::HTKDataSet($inputs_filenames  ,$one_file_is_one_sequence  ,$max_load  ,$targets_filename  ,$lex_  ,$words); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_HTKDataSet  torch_HTKDataSet ( flag inputs_filenames  targets_filename  n_files_  one_file_is_one_sequence  max_load  lex_  words )
  ((-bool-) flag)
  
  ((-gptr- "char **") inputs_filenames)  
  ((-gptr- "char **") targets_filename)  
  ((-int-) n_files_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-gptr- "Torch::LexiconInfo*") lex_)  
  ((-bool-) words)  
  #{ if($flag == 0) {
            $shell_flag = 0;
            $p = new Torch::HTKDataSet($inputs_filenames  ,$targets_filename  ,$n_files_  ,$one_file_is_one_sequence  ,$max_load  ,$lex_  ,$words); 
     }
  #} 
  ())

(defmethod  torch_HTKDataSet  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::HTKDataSet *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class MatDataSet : public MemoryDataSet
(defclass  torch_MatDataSet   torch_MemoryDataSet)

(defmethod  torch_MatDataSet  torch_MatDataSet ( flag filename  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
  ((-bool-) flag)
  
  ((-str-) filename)  
  ((-int-) n_inputs_)  
  ((-int-) n_targets_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-bool-) binary_mode)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::MatDataSet((const char *)$filename->data  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

;; (defmethod  torch_MatDataSet  torch_MatDataSet ( flag filenames  n_files_  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
;;   ((-bool-) flag)
;;   
;;   ((-gptr- "char **") filenames)  
;;   ((-int-) n_files_)  
;;   ((-int-) n_inputs_)  
;;   ((-int-) n_targets_)  
;;   ((-bool-) one_file_is_one_sequence)  
;;   ((-int-) max_load)  
;;   ((-bool-) binary_mode)  
;;   #{ if($flag == 0) {
;;             $shell_flag = 0;
;;             $p = new Torch::MatDataSet($filenames  ,$n_files_  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
;;      }
;;   #} 
;;   ())
;; 
;; (defmethod  torch_MatDataSet  torch_MatDataSet ( flag input_filenames  target_filenames  n_files_  max_load  binary_mode )
;;   ((-bool-) flag)
;;   
;;   ((-gptr- "char **") input_filenames)  
;;   ((-gptr- "char **") target_filenames)  
;;   ((-int-) n_files_)  
;;   ((-int-) max_load)  
;;   ((-bool-) binary_mode)  
;;   #{ if($flag == 0) {
;;             $shell_flag = 0;
;;             $p = new Torch::MatDataSet($input_filenames  ,$target_filenames  ,$n_files_  ,$max_load  ,$binary_mode); 
;;      }
;;   #} 
;;   ())

(defmethod  torch_MatDataSet  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::MatDataSet *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())




;;class ConnectedMachine : public GradientMachine
(defclass  torch_ConnectedMachine   torch_GradientMachine)

(defmethod  torch_ConnectedMachine  get_machines ()
  
  (gptr #{ ((Torch::ConnectedMachine *)$p)->machines   #} ))        ;; ConnectedNode ***  -> gptr

(defmethod  torch_ConnectedMachine  set_machines (s )
  
  ((-gptr- "Torch::ConnectedNode ***") s)  
  #{ ((Torch::ConnectedMachine *)$p)->machines = $s  ; #} 
  ())

(defmethod  torch_ConnectedMachine  get_n_machines_on_layer ()
  
  (gptr #{ ((Torch::ConnectedMachine *)$p)->n_machines_on_layer   #} ))        ;; int *  -> gptr

(defmethod  torch_ConnectedMachine  set_n_machines_on_layer (s )
  
  ((-gptr- "int *") s)  
  #{ ((Torch::ConnectedMachine *)$p)->n_machines_on_layer = $s  ; #} 
  ())

(defmethod  torch_ConnectedMachine  get_n_layers ()
  
  (int #{ ((Torch::ConnectedMachine *)$p)->n_layers   #} ))

(defmethod  torch_ConnectedMachine  set_n_layers (s )
  
  ((-int-) s)  
  #{ ((Torch::ConnectedMachine *)$p)->n_layers = $s  ; #} 
  ())

(defmethod  torch_ConnectedMachine  torch_ConnectedMachine ( flag )
  ((-bool-) flag)
  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::ConnectedMachine(); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_ConnectedMachine  addFCL (machine )
  
  ((-gptr- "Torch::GradientMachine *") machine)  
  #{ ((Torch::ConnectedMachine *)$p)->addFCL($machine)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  addMachine (machine )
  
  ((-gptr- "Torch::GradientMachine *") machine)  
  #{ ((Torch::ConnectedMachine *)$p)->addMachine($machine)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  connectOn (machine )
  
  ((-gptr- "Torch::GradientMachine *") machine)  
  #{ ((Torch::ConnectedMachine *)$p)->connectOn($machine)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  addLayer ()
  
  #{ ((Torch::ConnectedMachine *)$p)->addLayer()  ; #} 
  ())

(defmethod  torch_ConnectedMachine  build ()
  
  #{ ((Torch::ConnectedMachine *)$p)->build()  ; #} 
  ())

(defmethod  torch_ConnectedMachine  reset ()
  
  #{ ((Torch::ConnectedMachine *)$p)->reset()  ; #} 
  ())

(defmethod  torch_ConnectedMachine  iterInitialize ()
  
  #{ ((Torch::ConnectedMachine *)$p)->iterInitialize()  ; #} 
  ())

(defmethod  torch_ConnectedMachine  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::ConnectedMachine *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  backward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::ConnectedMachine *)$p)->backward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  loadXFile (file )
  
  ((-gptr- "Torch::XFile *") file)  
  #{ ((Torch::ConnectedMachine *)$p)->loadXFile($file)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  saveXFile (file )
  
  ((-gptr- "Torch::XFile *") file)  
  #{ ((Torch::ConnectedMachine *)$p)->saveXFile($file)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  setPartialBackprop (flag )
  
  ((-bool-) flag)  
  #{ ((Torch::ConnectedMachine *)$p)->setPartialBackprop($flag)  ; #} 
  ())

(defmethod  torch_ConnectedMachine  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::ConnectedMachine *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class Criterion : public GradientMachine
(defclass  torch_Criterion   torch_GradientMachine)

(defmethod  torch_Criterion  get_data ()
  
  (gptr #{ ((Torch::Criterion *)$p)->data   #} ))        ;; DataSet *  -> gptr

(defmethod  torch_Criterion  set_data (s )
  
  ((-gptr- "Torch::DataSet *") s)  
  #{ ((Torch::Criterion *)$p)->data = $s  ; #} 
  ())

(defmethod  torch_Criterion  torch_Criterion ( flag n_inputs_  n_params_ )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_params_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Criterion($n_inputs_  ,$n_params_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Criterion  setDataSet (data_ )
  
  ((-gptr- "Torch::DataSet *") data_)  
  #{ ((Torch::Criterion *)$p)->setDataSet($data_)  ; #} 
  ())

(defmethod  torch_Criterion  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Criterion *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class Distribution : public GradientMachine
(defclass  torch_Distribution   torch_GradientMachine)

(defmethod  torch_Distribution  get_log_probability ()
  
  (double #{ ((Torch::Distribution *)$p)->log_probability   #} ))

(defmethod  torch_Distribution  set_log_probability (s )
  
  ((-double-) s)  
  #{ ((Torch::Distribution *)$p)->log_probability = $s  ; #} 
  ())

(defmethod  torch_Distribution  get_log_probabilities ()
  
  (gptr #{ ((Torch::Distribution *)$p)->log_probabilities   #} ))        ;; Sequence*  -> gptr

(defmethod  torch_Distribution  set_log_probabilities (s )
  
  ((-gptr- "Torch::Sequence*") s)  
  #{ ((Torch::Distribution *)$p)->log_probabilities = $s  ; #} 
  ())

(defmethod  torch_Distribution  torch_Distribution ( flag n_inputs_  n_params_ )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_params_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Distribution($n_inputs_  ,$n_params_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Distribution  logProbability (inputs )
  
  ((-gptr- "Torch::Sequence*") inputs)  
  (double #{ ((Torch::Distribution *)$p)->logProbability($inputs)  #} ))

(defmethod  torch_Distribution  viterbiLogProbability (inputs )
  
  ((-gptr- "Torch::Sequence*") inputs)  
  (double #{ ((Torch::Distribution *)$p)->viterbiLogProbability($inputs)  #} ))

(defmethod  torch_Distribution  frameLogProbability (s  f_inputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  (double #{ ((Torch::Distribution *)$p)->frameLogProbability($s  ,$f_inputs)  #} ))

(defmethod  torch_Distribution  viterbiFrameLogProbability (s  f_inputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  (double #{ ((Torch::Distribution *)$p)->viterbiFrameLogProbability($s  ,$f_inputs)  #} ))

(defmethod  torch_Distribution  frameGenerate (s  inputs )
  
  ((-int-) s)  
  ((-gptr- "double *") inputs)  
  #{ ((Torch::Distribution *)$p)->frameGenerate($s  ,$inputs)  ; #} 
  ())

(defmethod  torch_Distribution  frameExpectation (s  inputs )
  
  ((-int-) s)  
  ((-gptr- "double *") inputs)  
  #{ ((Torch::Distribution *)$p)->frameExpectation($s  ,$inputs)  ; #} 
  ())

(defmethod  torch_Distribution  eMIterInitialize ()
  
  #{ ((Torch::Distribution *)$p)->eMIterInitialize()  ; #} 
  ())

(defmethod  torch_Distribution  iterInitialize ()
  
  #{ ((Torch::Distribution *)$p)->iterInitialize()  ; #} 
  ())

(defmethod  torch_Distribution  eMSequenceInitialize (inputs )
  
  ((-gptr- "Torch::Sequence*") inputs)  
  #{ ((Torch::Distribution *)$p)->eMSequenceInitialize($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  sequenceInitialize (inputs )
  
  ((-gptr- "Torch::Sequence*") inputs)  
  #{ ((Torch::Distribution *)$p)->sequenceInitialize($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  eMAccPosteriors (inputs  log_posterior )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-double-) log_posterior)  
  #{ ((Torch::Distribution *)$p)->eMAccPosteriors($inputs  ,$log_posterior)  ; #} 
  ())

(defmethod  torch_Distribution  frameEMAccPosteriors (s  f_inputs  log_posterior )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-double-) log_posterior)  
  #{ ((Torch::Distribution *)$p)->frameEMAccPosteriors($s  ,$f_inputs  ,$log_posterior)  ; #} 
  ())

(defmethod  torch_Distribution  viterbiAccPosteriors (inputs  log_posterior )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-double-) log_posterior)  
  #{ ((Torch::Distribution *)$p)->viterbiAccPosteriors($inputs  ,$log_posterior)  ; #} 
  ())

(defmethod  torch_Distribution  frameViterbiAccPosteriors (s  f_inputs  log_posterior )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-double-) log_posterior)  
  #{ ((Torch::Distribution *)$p)->frameViterbiAccPosteriors($s  ,$f_inputs  ,$log_posterior)  ; #} 
  ())

(defmethod  torch_Distribution  eMUpdate ()
  
  #{ ((Torch::Distribution *)$p)->eMUpdate()  ; #} 
  ())

(defmethod  torch_Distribution  decode (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::Distribution *)$p)->decode($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::Distribution *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  eMForward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::Distribution *)$p)->eMForward($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  viterbiForward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::Distribution *)$p)->viterbiForward($inputs)  ; #} 
  ())

(defmethod  torch_Distribution  backward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::Distribution *)$p)->backward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_Distribution  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Distribution *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Distribution  viterbiBackward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::Distribution *)$p)->viterbiBackward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_Distribution  loadXFile (file )
  
  ((-gptr- "Torch::XFile *") file)  
  #{ ((Torch::Distribution *)$p)->loadXFile($file)  ; #} 
  ())

(defmethod  torch_Distribution  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Distribution *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())






;;class Exp : public GradientMachine
(defclass  torch_Exp   torch_GradientMachine)

(defmethod  torch_Exp  torch_Exp ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Exp($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Exp  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::Exp *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_Exp  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Exp *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Exp  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Exp *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class InputsSelect : public GradientMachine
(defclass  torch_InputsSelect   torch_GradientMachine)

(defmethod  torch_InputsSelect  get_offset ()
  
  (int #{ ((Torch::InputsSelect *)$p)->offset   #} ))

(defmethod  torch_InputsSelect  set_offset (s )
  
  ((-int-) s)  
  #{ ((Torch::InputsSelect *)$p)->offset = $s  ; #} 
  ())

(defmethod  torch_InputsSelect  torch_InputsSelect ( flag n_inputs_  offset_  n_selected_ )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) offset_)  
  ((-int-) n_selected_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::InputsSelect($n_inputs_  ,$offset_  ,$n_selected_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_InputsSelect  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::InputsSelect *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_InputsSelect  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::InputsSelect *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_InputsSelect  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::InputsSelect *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class Linear : public GradientMachine
(defclass  torch_Linear   torch_GradientMachine)

(defmethod  torch_Linear  get_weight_decay ()
  
  (double #{ ((Torch::Linear *)$p)->weight_decay   #} ))

(defmethod  torch_Linear  set_weight_decay (s )
  
  ((-double-) s)  
  #{ ((Torch::Linear *)$p)->weight_decay = $s  ; #} 
  ())

(defmethod  torch_Linear  get_weights ()
  
  (gptr #{ ((Torch::Linear *)$p)->weights   #} ))        ;; double *  -> gptr

(defmethod  torch_Linear  set_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::Linear *)$p)->weights = $s  ; #} 
  ())

(defmethod  torch_Linear  get_bias ()
  
  (gptr #{ ((Torch::Linear *)$p)->bias   #} ))        ;; double *  -> gptr

(defmethod  torch_Linear  set_bias (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::Linear *)$p)->bias = $s  ; #} 
  ())

(defmethod  torch_Linear  get_der_weights ()
  
  (gptr #{ ((Torch::Linear *)$p)->der_weights   #} ))        ;; double *  -> gptr

(defmethod  torch_Linear  set_der_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::Linear *)$p)->der_weights = $s  ; #} 
  ())

(defmethod  torch_Linear  get_der_bias ()
  
  (gptr #{ ((Torch::Linear *)$p)->der_bias   #} ))        ;; double *  -> gptr

(defmethod  torch_Linear  set_der_bias (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::Linear *)$p)->der_bias = $s  ; #} 
  ())

(defmethod  torch_Linear  reset_ ()
  
  #{ ((Torch::Linear *)$p)->reset_()  ; #} 
  ())

(defmethod  torch_Linear  torch_Linear ( flag n_inputs_  n_outputs_ )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_outputs_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Linear($n_inputs_  ,$n_outputs_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Linear  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::Linear *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_Linear  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Linear *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Linear  reset ()
  
  #{ ((Torch::Linear *)$p)->reset()  ; #} 
  ())

(defmethod  torch_Linear  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Linear *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())






;;class LogMixer : public GradientMachine
(defclass  torch_LogMixer   torch_GradientMachine)

(defmethod  torch_LogMixer  get_n_experts ()
  
  (int #{ ((Torch::LogMixer *)$p)->n_experts   #} ))

(defmethod  torch_LogMixer  set_n_experts (s )
  
  ((-int-) s)  
  #{ ((Torch::LogMixer *)$p)->n_experts = $s  ; #} 
  ())

(defmethod  torch_LogMixer  torch_LogMixer ( flag n_inputs_  n_outputs_per_expert )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_outputs_per_expert)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::LogMixer($n_inputs_  ,$n_outputs_per_expert); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_LogMixer  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::LogMixer *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_LogMixer  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::LogMixer *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_LogMixer  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::LogMixer *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class LogRBF : public GradientMachine
(defclass  torch_LogRBF   torch_GradientMachine)

(defmethod  torch_LogRBF  get_initial_kmeans_trainer ()
  
  (gptr #{ ((Torch::LogRBF *)$p)->initial_kmeans_trainer   #} ))        ;; EMTrainer*  -> gptr

(defmethod  torch_LogRBF  set_initial_kmeans_trainer (s )
  
  ((-gptr- "Torch::EMTrainer*") s)  
  #{ ((Torch::LogRBF *)$p)->initial_kmeans_trainer = $s  ; #} 
  ())


(defmethod  torch_LogRBF  torch_LogRBF ( flag n_inputs_  n_outputs_  kmeans_trainer )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_outputs_)  
  ((-gptr- "Torch::EMTrainer*") kmeans_trainer)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::LogRBF($n_inputs_  ,$n_outputs_  ,$kmeans_trainer); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_LogRBF  setDataSet (data_ )
  
  ((-gptr- "Torch::DataSet*") data_)  
  #{ ((Torch::LogRBF *)$p)->setDataSet($data_)  ; #} 
  ())

(defmethod  torch_LogRBF  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::LogRBF *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_LogRBF  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::LogRBF *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_LogRBF  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::LogRBF *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class LogSigmoid : public GradientMachine
(defclass  torch_LogSigmoid   torch_GradientMachine)

(defmethod  torch_LogSigmoid  get_buff ()
  
  (gptr #{ ((Torch::LogSigmoid *)$p)->buff   #} ))        ;; double *  -> gptr

(defmethod  torch_LogSigmoid  set_buff (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::LogSigmoid *)$p)->buff = $s  ; #} 
  ())

(defmethod  torch_LogSigmoid  torch_LogSigmoid ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::LogSigmoid($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_LogSigmoid  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::LogSigmoid *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_LogSigmoid  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::LogSigmoid *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_LogSigmoid  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::LogSigmoid *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class LogSoftMax : public GradientMachine
(defclass  torch_LogSoftMax   torch_GradientMachine)

(defmethod  torch_LogSoftMax  torch_LogSoftMax ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::LogSoftMax($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_LogSoftMax  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::LogSoftMax *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_LogSoftMax  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::LogSoftMax *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_LogSoftMax  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::LogSoftMax *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())






;;class Mixer : public GradientMachine
(defclass  torch_Mixer   torch_GradientMachine)

(defmethod  torch_Mixer  get_n_experts ()
  
  (int #{ ((Torch::Mixer *)$p)->n_experts   #} ))

(defmethod  torch_Mixer  set_n_experts (s )
  
  ((-int-) s)  
  #{ ((Torch::Mixer *)$p)->n_experts = $s  ; #} 
  ())

(defmethod  torch_Mixer  torch_Mixer ( flag n_inputs_  n_outputs_per_expert )
  ((-bool-) flag)
  
  ((-int-) n_inputs_)  
  ((-int-) n_outputs_per_expert)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Mixer($n_inputs_  ,$n_outputs_per_expert); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Mixer  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::Mixer *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_Mixer  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Mixer *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Mixer  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Mixer *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())





;;class Sigmoid : public GradientMachine
(defclass  torch_Sigmoid   torch_GradientMachine)

(defmethod  torch_Sigmoid  torch_Sigmoid ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Sigmoid($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Sigmoid  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::Sigmoid *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_Sigmoid  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Sigmoid *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Sigmoid  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Sigmoid *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class SoftMax : public GradientMachine
(defclass  torch_SoftMax   torch_GradientMachine)

(defmethod  torch_SoftMax  get_shift ()
  
  (double #{ ((Torch::SoftMax *)$p)->shift   #} ))

(defmethod  torch_SoftMax  set_shift (s )
  
  ((-double-) s)  
  #{ ((Torch::SoftMax *)$p)->shift = $s  ; #} 
  ())

(defmethod  torch_SoftMax  get_calc_shift ()
  
  (bool #{ ((Torch::SoftMax *)$p)->calc_shift   #} ))

(defmethod  torch_SoftMax  set_calc_shift (s )
  
  ((-bool-) s)  
  #{ ((Torch::SoftMax *)$p)->calc_shift = $s  ; #} 
  ())

(defmethod  torch_SoftMax  torch_SoftMax ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SoftMax($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SoftMax  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::SoftMax *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_SoftMax  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::SoftMax *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_SoftMax  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::SoftMax *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class SoftPlus : public GradientMachine
(defclass  torch_SoftPlus   torch_GradientMachine)

(defmethod  torch_SoftPlus  torch_SoftPlus ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SoftPlus($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SoftPlus  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::SoftPlus *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_SoftPlus  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::SoftPlus *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_SoftPlus  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::SoftPlus *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())




;;class SpatialConvolution : public GradientMachine
(defclass  torch_SpatialConvolution   torch_GradientMachine)

(defmethod  torch_SpatialConvolution  get_k_w ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->k_w   #} ))

(defmethod  torch_SpatialConvolution  set_k_w (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->k_w = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_d_x ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->d_x   #} ))

(defmethod  torch_SpatialConvolution  set_d_x (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->d_x = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_d_y ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->d_y   #} ))

(defmethod  torch_SpatialConvolution  set_d_y (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->d_y = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_n_input_planes ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->n_input_planes   #} ))

(defmethod  torch_SpatialConvolution  set_n_input_planes (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->n_input_planes = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_n_output_planes ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->n_output_planes   #} ))

(defmethod  torch_SpatialConvolution  set_n_output_planes (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->n_output_planes = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_input_height ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->input_height   #} ))

(defmethod  torch_SpatialConvolution  set_input_height (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->input_height = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_input_width ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->input_width   #} ))

(defmethod  torch_SpatialConvolution  set_input_width (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->input_width = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_output_height ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->output_height   #} ))

(defmethod  torch_SpatialConvolution  set_output_height (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->output_height = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_output_width ()
  
  (int #{ ((Torch::SpatialConvolution *)$p)->output_width   #} ))

(defmethod  torch_SpatialConvolution  set_output_width (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialConvolution *)$p)->output_width = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_weights ()
  
  (gptr #{ ((Torch::SpatialConvolution *)$p)->weights   #} ))        ;; double **  -> gptr

(defmethod  torch_SpatialConvolution  set_weights (s )
  
  ((-gptr- "double **") s)  
  #{ ((Torch::SpatialConvolution *)$p)->weights = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_der_weights ()
  
  (gptr #{ ((Torch::SpatialConvolution *)$p)->der_weights   #} ))        ;; double **  -> gptr

(defmethod  torch_SpatialConvolution  set_der_weights (s )
  
  ((-gptr- "double **") s)  
  #{ ((Torch::SpatialConvolution *)$p)->der_weights = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_biases ()
  
  (gptr #{ ((Torch::SpatialConvolution *)$p)->biases   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialConvolution  set_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialConvolution *)$p)->biases = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  get_der_biases ()
  
  (gptr #{ ((Torch::SpatialConvolution *)$p)->der_biases   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialConvolution  set_der_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialConvolution *)$p)->der_biases = $s  ; #} 
  ())

(defmethod  torch_SpatialConvolution  torch_SpatialConvolution ( flag n_input_planes_  n_output_planes_  width_  height_  k_w_  d_x_  d_y_ )
  ((-bool-) flag)
  
  ((-int-) n_input_planes_)  
  ((-int-) n_output_planes_)  
  ((-int-) width_)  
  ((-int-) height_)  
  ((-int-) k_w_)  
  ((-int-) d_x_)  
  ((-int-) d_y_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SpatialConvolution($n_input_planes_  ,$n_output_planes_  ,$width_  ,$height_  ,$k_w_  ,$d_x_  ,$d_y_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SpatialConvolution  reset_ ()
  
  #{ ((Torch::SpatialConvolution *)$p)->reset_()  ; #} 
  ())

(defmethod  torch_SpatialConvolution  reset ()
  
  #{ ((Torch::SpatialConvolution *)$p)->reset()  ; #} 
  ())

(defmethod  torch_SpatialConvolution  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::SpatialConvolution *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_SpatialConvolution  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::SpatialConvolution *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_SpatialConvolution  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::SpatialConvolution *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class SpatialSubSampling : public GradientMachine
(defclass  torch_SpatialSubSampling   torch_GradientMachine)

(defmethod  torch_SpatialSubSampling  get_k_w ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->k_w   #} ))

(defmethod  torch_SpatialSubSampling  set_k_w (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->k_w = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_d_x ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->d_x   #} ))

(defmethod  torch_SpatialSubSampling  set_d_x (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->d_x = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_d_y ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->d_y   #} ))

(defmethod  torch_SpatialSubSampling  set_d_y (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->d_y = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_n_input_planes ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->n_input_planes   #} ))

(defmethod  torch_SpatialSubSampling  set_n_input_planes (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->n_input_planes = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_input_height ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->input_height   #} ))

(defmethod  torch_SpatialSubSampling  set_input_height (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->input_height = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_input_width ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->input_width   #} ))

(defmethod  torch_SpatialSubSampling  set_input_width (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->input_width = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_output_height ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->output_height   #} ))

(defmethod  torch_SpatialSubSampling  set_output_height (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->output_height = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_output_width ()
  
  (int #{ ((Torch::SpatialSubSampling *)$p)->output_width   #} ))

(defmethod  torch_SpatialSubSampling  set_output_width (s )
  
  ((-int-) s)  
  #{ ((Torch::SpatialSubSampling *)$p)->output_width = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_weights ()
  
  (gptr #{ ((Torch::SpatialSubSampling *)$p)->weights   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialSubSampling  set_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialSubSampling *)$p)->weights = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_der_weights ()
  
  (gptr #{ ((Torch::SpatialSubSampling *)$p)->der_weights   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialSubSampling  set_der_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialSubSampling *)$p)->der_weights = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_biases ()
  
  (gptr #{ ((Torch::SpatialSubSampling *)$p)->biases   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialSubSampling  set_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialSubSampling *)$p)->biases = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  get_der_biases ()
  
  (gptr #{ ((Torch::SpatialSubSampling *)$p)->der_biases   #} ))        ;; double *  -> gptr

(defmethod  torch_SpatialSubSampling  set_der_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SpatialSubSampling *)$p)->der_biases = $s  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  torch_SpatialSubSampling ( flag n_input_planes_  width_  height_  k_w_  d_x_  d_y_ )
  ((-bool-) flag)
  
  ((-int-) n_input_planes_)  
  ((-int-) width_)  
  ((-int-) height_)  
  ((-int-) k_w_)  
  ((-int-) d_x_)  
  ((-int-) d_y_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SpatialSubSampling($n_input_planes_  ,$width_  ,$height_  ,$k_w_  ,$d_x_  ,$d_y_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SpatialSubSampling  reset_ ()
  
  #{ ((Torch::SpatialSubSampling *)$p)->reset_()  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  reset ()
  
  #{ ((Torch::SpatialSubSampling *)$p)->reset()  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::SpatialSubSampling *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::SpatialSubSampling *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_SpatialSubSampling  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::SpatialSubSampling *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())







;;class SumMachine : public GradientMachine
(defclass  torch_SumMachine   torch_GradientMachine)

(defmethod  torch_SumMachine  get_n_machines ()
  
  (int #{ ((Torch::SumMachine *)$p)->n_machines   #} ))

(defmethod  torch_SumMachine  set_n_machines (s )
  
  ((-int-) s)  
  #{ ((Torch::SumMachine *)$p)->n_machines = $s  ; #} 
  ())

(defmethod  torch_SumMachine  torch_SumMachine ( flag n_units  n_machines_ )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  ((-int-) n_machines_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SumMachine($n_units  ,$n_machines_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SumMachine  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::SumMachine *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_SumMachine  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::SumMachine *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_SumMachine  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::SumMachine *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())






;;class Tanh : public GradientMachine
(defclass  torch_Tanh   torch_GradientMachine)

(defmethod  torch_Tanh  torch_Tanh ( flag n_units )
  ((-bool-) flag)
  
  ((-int-) n_units)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::Tanh($n_units); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_Tanh  frameForward (s  f_inputs  f_outputs )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") f_outputs)  
  #{ ((Torch::Tanh *)$p)->frameForward($s  ,$f_inputs  ,$f_outputs)  ; #} 
  ())

(defmethod  torch_Tanh  frameBackward (s  f_inputs  beta_  f_outputs  alpha_ )
  
  ((-int-) s)  
  ((-gptr- "double *") f_inputs)  
  ((-gptr- "double *") beta_)  
  ((-gptr- "double *") f_outputs)  
  ((-gptr- "double *") alpha_)  
  #{ ((Torch::Tanh *)$p)->frameBackward($s  ,$f_inputs  ,$beta_  ,$f_outputs  ,$alpha_)  ; #} 
  ())

(defmethod  torch_Tanh  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::Tanh *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())







;;class TemporalConvolution : public GradientMachine
(defclass  torch_TemporalConvolution   torch_GradientMachine)

(defmethod  torch_TemporalConvolution  get_k_w ()
  
  (int #{ ((Torch::TemporalConvolution *)$p)->k_w   #} ))

(defmethod  torch_TemporalConvolution  set_k_w (s )
  
  ((-int-) s)  
  #{ ((Torch::TemporalConvolution *)$p)->k_w = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  get_d_t ()
  
  (int #{ ((Torch::TemporalConvolution *)$p)->d_t   #} ))

(defmethod  torch_TemporalConvolution  set_d_t (s )
  
  ((-int-) s)  
  #{ ((Torch::TemporalConvolution *)$p)->d_t = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  get_weights ()
  
  (gptr #{ ((Torch::TemporalConvolution *)$p)->weights   #} ))        ;; double **  -> gptr

(defmethod  torch_TemporalConvolution  set_weights (s )
  
  ((-gptr- "double **") s)  
  #{ ((Torch::TemporalConvolution *)$p)->weights = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  get_der_weights ()
  
  (gptr #{ ((Torch::TemporalConvolution *)$p)->der_weights   #} ))        ;; double **  -> gptr

(defmethod  torch_TemporalConvolution  set_der_weights (s )
  
  ((-gptr- "double **") s)  
  #{ ((Torch::TemporalConvolution *)$p)->der_weights = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  get_biases ()
  
  (gptr #{ ((Torch::TemporalConvolution *)$p)->biases   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalConvolution  set_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalConvolution *)$p)->biases = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  get_der_biases ()
  
  (gptr #{ ((Torch::TemporalConvolution *)$p)->der_biases   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalConvolution  set_der_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalConvolution *)$p)->der_biases = $s  ; #} 
  ())

(defmethod  torch_TemporalConvolution  torch_TemporalConvolution ( flag input_frame_size  output_frame_size  k_w_  d_t_ )
  ((-bool-) flag)
  
  ((-int-) input_frame_size)  
  ((-int-) output_frame_size)  
  ((-int-) k_w_)  
  ((-int-) d_t_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::TemporalConvolution($input_frame_size  ,$output_frame_size  ,$k_w_  ,$d_t_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_TemporalConvolution  reset_ ()
  
  #{ ((Torch::TemporalConvolution *)$p)->reset_()  ; #} 
  ())

(defmethod  torch_TemporalConvolution  reset ()
  
  #{ ((Torch::TemporalConvolution *)$p)->reset()  ; #} 
  ())

(defmethod  torch_TemporalConvolution  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::TemporalConvolution *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_TemporalConvolution  backward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::TemporalConvolution *)$p)->backward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_TemporalConvolution  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::TemporalConvolution *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class TemporalMean : public GradientMachine
(defclass  torch_TemporalMean   torch_GradientMachine)

(defmethod  torch_TemporalMean  torch_TemporalMean ( flag input_frame_size )
  ((-bool-) flag)
  
  ((-int-) input_frame_size)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::TemporalMean($input_frame_size); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_TemporalMean  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::TemporalMean *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_TemporalMean  backward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::TemporalMean *)$p)->backward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_TemporalMean  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::TemporalMean *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())



;;class TemporalSubSampling : public GradientMachine
(defclass  torch_TemporalSubSampling   torch_GradientMachine)

(defmethod  torch_TemporalSubSampling  get_k_w ()
  
  (int #{ ((Torch::TemporalSubSampling *)$p)->k_w   #} ))

(defmethod  torch_TemporalSubSampling  set_k_w (s )
  
  ((-int-) s)  
  #{ ((Torch::TemporalSubSampling *)$p)->k_w = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  get_d_t ()
  
  (int #{ ((Torch::TemporalSubSampling *)$p)->d_t   #} ))

(defmethod  torch_TemporalSubSampling  set_d_t (s )
  
  ((-int-) s)  
  #{ ((Torch::TemporalSubSampling *)$p)->d_t = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  get_weights ()
  
  (gptr #{ ((Torch::TemporalSubSampling *)$p)->weights   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalSubSampling  set_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalSubSampling *)$p)->weights = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  get_der_weights ()
  
  (gptr #{ ((Torch::TemporalSubSampling *)$p)->der_weights   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalSubSampling  set_der_weights (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalSubSampling *)$p)->der_weights = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  get_biases ()
  
  (gptr #{ ((Torch::TemporalSubSampling *)$p)->biases   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalSubSampling  set_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalSubSampling *)$p)->biases = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  get_der_biases ()
  
  (gptr #{ ((Torch::TemporalSubSampling *)$p)->der_biases   #} ))        ;; double *  -> gptr

(defmethod  torch_TemporalSubSampling  set_der_biases (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::TemporalSubSampling *)$p)->der_biases = $s  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  torch_TemporalSubSampling ( flag input_frame_size  k_w_  d_t_ )
  ((-bool-) flag)
  
  ((-int-) input_frame_size)  
  ((-int-) k_w_)  
  ((-int-) d_t_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::TemporalSubSampling($input_frame_size  ,$k_w_  ,$d_t_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_TemporalSubSampling  reset_ ()
  
  #{ ((Torch::TemporalSubSampling *)$p)->reset_()  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  reset ()
  
  #{ ((Torch::TemporalSubSampling *)$p)->reset()  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::TemporalSubSampling *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  backward (inputs  alpha )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  ((-gptr- "Torch::Sequence *") alpha)  
  #{ ((Torch::TemporalSubSampling *)$p)->backward($inputs  ,$alpha)  ; #} 
  ())

(defmethod  torch_TemporalSubSampling  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::TemporalSubSampling *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())







;;class SVM : public QCMachine
(defclass  torch_SVM   torch_QCMachine)

(defmethod  torch_SVM  get_sv_allocator ()
  
  (gptr #{ ((Torch::SVM *)$p)->sv_allocator   #} ))        ;; Allocator *  -> gptr

(defmethod  torch_SVM  set_sv_allocator (s )
  
  ((-gptr- "Torch::Allocator *") s)  
  #{ ((Torch::SVM *)$p)->sv_allocator = $s  ; #} 
  ())

(defmethod  torch_SVM  get_io_sequence_array ()
  
  (gptr #{ ((Torch::SVM *)$p)->io_sequence_array   #} ))        ;; IOSequenceArray *  -> gptr

(defmethod  torch_SVM  set_io_sequence_array (s )
  
  ((-gptr- "Torch::IOSequenceArray *") s)  
  #{ ((Torch::SVM *)$p)->io_sequence_array = $s  ; #} 
  ())

(defmethod  torch_SVM  get_data ()
  
  (gptr #{ ((Torch::SVM *)$p)->data   #} ))        ;; DataSet *  -> gptr

(defmethod  torch_SVM  set_data (s )
  
  ((-gptr- "Torch::DataSet *") s)  
  #{ ((Torch::SVM *)$p)->data = $s  ; #} 
  ())

(defmethod  torch_SVM  get_kernel ()
  
  (gptr #{ ((Torch::SVM *)$p)->kernel   #} ))        ;; Kernel *  -> gptr

(defmethod  torch_SVM  set_kernel (s )
  
  ((-gptr- "Torch::Kernel *") s)  
  #{ ((Torch::SVM *)$p)->kernel = $s  ; #} 
  ())

(defmethod  torch_SVM  get_b ()
  
  (double #{ ((Torch::SVM *)$p)->b   #} ))

(defmethod  torch_SVM  set_b (s )
  
  ((-double-) s)  
  #{ ((Torch::SVM *)$p)->b = $s  ; #} 
  ())

(defmethod  torch_SVM  get_support_vectors ()
  
  (gptr #{ ((Torch::SVM *)$p)->support_vectors   #} ))        ;; int *  -> gptr

(defmethod  torch_SVM  set_support_vectors (s )
  
  ((-gptr- "int *") s)  
  #{ ((Torch::SVM *)$p)->support_vectors = $s  ; #} 
  ())

(defmethod  torch_SVM  get_sv_alpha ()
  
  (gptr #{ ((Torch::SVM *)$p)->sv_alpha   #} ))        ;; double *  -> gptr

(defmethod  torch_SVM  set_sv_alpha (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SVM *)$p)->sv_alpha = $s  ; #} 
  ())

(defmethod  torch_SVM  get_sv_sequences ()
  
  (gptr #{ ((Torch::SVM *)$p)->sv_sequences   #} ))        ;; Sequence **  -> gptr

(defmethod  torch_SVM  set_sv_sequences (s )
  
  ((-gptr- "Torch::Sequence **") s)  
  #{ ((Torch::SVM *)$p)->sv_sequences = $s  ; #} 
  ())

(defmethod  torch_SVM  get_n_support_vectors ()
  
  (int #{ ((Torch::SVM *)$p)->n_support_vectors   #} ))

(defmethod  torch_SVM  set_n_support_vectors (s )
  
  ((-int-) s)  
  #{ ((Torch::SVM *)$p)->n_support_vectors = $s  ; #} 
  ())

(defmethod  torch_SVM  get_n_support_vectors_bound ()
  
  (int #{ ((Torch::SVM *)$p)->n_support_vectors_bound   #} ))

(defmethod  torch_SVM  set_n_support_vectors_bound (s )
  
  ((-int-) s)  
  #{ ((Torch::SVM *)$p)->n_support_vectors_bound = $s  ; #} 
  ())

(defmethod  torch_SVM  torch_SVM ( flag kernel_  io_sequence_array_ )
  ((-bool-) flag)
  
  ((-gptr- "Torch::Kernel *") kernel_)  
  ((-gptr- "Torch::IOSequenceArray *") io_sequence_array_)  
;;  #{ if($flag == false) {
;;            $shell_flag = false;
;;            $p = new Torch::SVM($kernel_  ,$io_sequence_array_); 
;;     }
;;     else
;;            $shell_flag = true; 
;;  #} 
  ())

(defmethod  torch_SVM  bCompute ()
  
  (bool #{ ((Torch::SVM *)$p)->bCompute()  #} ))

(defmethod  torch_SVM  forward (inputs )
  
  ((-gptr- "Torch::Sequence *") inputs)  
  #{ ((Torch::SVM *)$p)->forward($inputs)  ; #} 
  ())

(defmethod  torch_SVM  loadXFile (file )
  
  ((-gptr- "Torch::XFile *") file)  
  #{ ((Torch::SVM *)$p)->loadXFile($file)  ; #} 
  ())

(defmethod  torch_SVM  saveXFile (file )
  
  ((-gptr- "Torch::XFile *") file)  
  #{ ((Torch::SVM *)$p)->saveXFile($file)  ; #} 
  ())

(defmethod  torch_SVM  -destructor  ()
  
;;  #{ if ( $shell_flag == false )  {
;;             delete  ((Torch::SVM *)$p);
;;             $p = NULL;
;;             $shell_flag = true; 
;;     }
;;  #} 
  ())





;;class SVMCacheClassification : public SVMCache
(defclass  torch_SVMCacheClassification   torch_SVMCache)

(defmethod  torch_SVMCacheClassification  get_data ()
  
  (gptr #{ ((Torch::SVMCacheClassification *)$p)->data   #} ))        ;; DataSet *  -> gptr

(defmethod  torch_SVMCacheClassification  set_data (s )
  
  ((-gptr- "Torch::DataSet *") s)  
  #{ ((Torch::SVMCacheClassification *)$p)->data = $s  ; #} 
  ())

(defmethod  torch_SVMCacheClassification  get_y ()
  
  (gptr #{ ((Torch::SVMCacheClassification *)$p)->y   #} ))        ;; double *  -> gptr

(defmethod  torch_SVMCacheClassification  set_y (s )
  
  ((-gptr- "double *") s)  
  #{ ((Torch::SVMCacheClassification *)$p)->y = $s  ; #} 
  ())

(defmethod  torch_SVMCacheClassification  torch_SVMCacheClassification ( flag data_  kernel_  cache_size_in_megs_ )
  ((-bool-) flag)
  
  ((-gptr- "Torch::DataSet *") data_)  
  ((-gptr- "Torch::Kernel *") kernel_)  
  ((-double-) cache_size_in_megs_)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::SVMCacheClassification($data_  ,$kernel_  ,$cache_size_in_megs_); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_SVMCacheClassification  getColumn (index  adr )
  
  ((-int-) index)  
  ((-gptr- "double *") adr)  
  #{ ((Torch::SVMCacheClassification *)$p)->getColumn($index  ,$adr)  ; #} 
  ())





;;class SVMCacheRegression : public SVMCache
(defclass  torch_SVMCacheRegression   torch_SVMCache)

(defmethod  torch_SVMCacheRegression  get_data ()
  
  (gptr #{ ((Torch::SVMCacheRegression *)$p)->data   #} ))        ;; DataSet *  -> gptr

(defmethod  torch_SVMCacheRegression  set_data (s )
  
  ((-gptr- "Torch::DataSet *") s)  
  #{ ((Torch::SVMCacheRegression *)$p)->data = $s  ; #} 
  ())

(defmethod  torch_SVMCacheRegression  get_n_examples ()
  
  (int #{ ((Torch::SVMCacheRegression *)$p)->n_examples   #} ))

(defmethod  torch_SVMCacheRegression  set_n_examples (s )
  
  ((-int-) s)  
  #{ ((Torch::SVMCacheRegression *)$p)->n_examples = $s  ; #} 
  ())

(defmethod  torch_SVMCacheRegression  torch_SVMCacheRegression ( flag data_  kernel_  cache_size_in_megs_ )
  ((-bool-) flag)
  
  ((-gptr- "Torch::DataSet *") data_)  
  ((-gptr- "Torch::Kernel *") kernel_)  
  ((-double-) cache_size_in_megs_)  
  #{ if($flag == 0) {
            $shell_flag = 0;
            $p = new Torch::SVMCacheRegression($data_  ,$kernel_  ,$cache_size_in_megs_); 
     }
  #} 
  ())

(defmethod  torch_SVMCacheRegression  getColumn (index  adr )
  
  ((-int-) index)  
  ((-gptr- "double *") adr)  
  #{ ((Torch::SVMCacheRegression *)$p)->getColumn($index  ,$adr)  ; #} 
  ())








;;class PipeXFile : public DiskXFile
(defclass  torch_PipeXFile   torch_DiskXFile)

(defmethod  torch_PipeXFile  torch_PipeXFile ( flag command  open_flags )
  ((-bool-) flag)
  
  ((-gptr- "const char *") command)  
  ((-gptr- "const char *") open_flags)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::PipeXFile($command  ,$open_flags); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_PipeXFile  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::PipeXFile *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())







;; ********************************************************

(dhc-make-with-c++ () (list torch-libtorch) 
  dummy_level3
;; overloaded constructor: torch_diskhtkdataset 
  (torch_diskhtkdataset  -destructor   torch_diskhtkdataset)
;; overloaded constructor: torch_diskmatdataset  torch_diskmatdataset
  (torch_diskmatdataset  -destructor   torch_diskmatdataset)
;; overloaded constructor: torch_htkdataset 
  (torch_htkdataset  -destructor   torch_htkdataset)
;; overloaded constructor: torch_matdataset  torch_matdataset 
  (torch_matdataset  -destructor   torch_matdataset)
  (torch_connectedmachine  -destructor  setpartialbackprop  savexfile  loadxfile  backward  forward  iterinitialize  reset  build  addlayer  connecton  addmachine  addfcl  torch_connectedmachine  set_n_layers  get_n_layers  set_n_machines_on_layer  get_n_machines_on_layer  set_machines  get_machines)
  (torch_criterion  -destructor  setdataset  torch_criterion  set_data  get_data)
  (torch_distribution  -destructor  loadxfile  viterbibackward  framebackward  backward  viterbiforward  emforward  forward  decode  emupdate  frameviterbiaccposteriors  viterbiaccposteriors  frameemaccposteriors  emaccposteriors  sequenceinitialize  emsequenceinitialize  iterinitialize  emiterinitialize  frameexpectation  framegenerate  viterbiframelogprobability  framelogprobability  viterbilogprobability  logprobability  torch_distribution  set_log_probabilities  get_log_probabilities  set_log_probability  get_log_probability)
  (torch_exp  -destructor  framebackward  frameforward  torch_exp)
  (torch_inputsselect  -destructor  framebackward  frameforward  torch_inputsselect  set_offset  get_offset)
  (torch_linear  -destructor  reset  framebackward  frameforward  torch_linear  reset_  set_der_bias  get_der_bias  set_der_weights  get_der_weights  set_bias  get_bias  set_weights  get_weights  set_weight_decay  get_weight_decay)
  (torch_logmixer  -destructor  framebackward  frameforward  torch_logmixer  set_n_experts  get_n_experts)
  (torch_logrbf  -destructor  framebackward  frameforward  setdataset  torch_logrbf  set_initial_kmeans_trainer  get_initial_kmeans_trainer)
  (torch_logsigmoid  -destructor  framebackward  frameforward  torch_logsigmoid  set_buff  get_buff)
  (torch_logsoftmax  -destructor  framebackward  frameforward  torch_logsoftmax)
  (torch_mixer  -destructor  framebackward  frameforward  torch_mixer  set_n_experts  get_n_experts)
  (torch_sigmoid  -destructor  framebackward  frameforward  torch_sigmoid)
  (torch_softmax  -destructor  framebackward  frameforward  torch_softmax  set_calc_shift  get_calc_shift  set_shift  get_shift)
  (torch_softplus  -destructor  framebackward  frameforward  torch_softplus)
  (torch_spatialconvolution  -destructor  framebackward  frameforward  reset  reset_  torch_spatialconvolution  set_der_biases  get_der_biases  set_biases  get_biases  set_der_weights  get_der_weights  set_weights  get_weights  set_output_width  get_output_width  set_output_height  get_output_height  set_input_width  get_input_width  set_input_height  get_input_height  set_n_output_planes  get_n_output_planes  set_n_input_planes  get_n_input_planes  set_d_y  get_d_y  set_d_x  get_d_x  set_k_w  get_k_w)
  (torch_spatialsubsampling  -destructor  framebackward  frameforward  reset  reset_  torch_spatialsubsampling  set_der_biases  get_der_biases  set_biases  get_biases  set_der_weights  get_der_weights  set_weights  get_weights  set_output_width  get_output_width  set_output_height  get_output_height  set_input_width  get_input_width  set_input_height  get_input_height  set_n_input_planes  get_n_input_planes  set_d_y  get_d_y  set_d_x  get_d_x  set_k_w  get_k_w)
  (torch_summachine  -destructor  framebackward  frameforward  torch_summachine  set_n_machines  get_n_machines)
  (torch_tanh  -destructor  framebackward  frameforward  torch_tanh)
  (torch_temporalconvolution  -destructor  backward  forward  reset  reset_  torch_temporalconvolution  set_der_biases  get_der_biases  set_biases  get_biases  set_der_weights  get_der_weights  set_weights  get_weights  set_d_t  get_d_t  set_k_w  get_k_w)
  (torch_temporalmean  -destructor  backward  forward  torch_temporalmean)
  (torch_temporalsubsampling  -destructor  backward  forward  reset  reset_  torch_temporalsubsampling  set_der_biases  get_der_biases  set_biases  get_biases  set_der_weights  get_der_weights  set_weights  get_weights  set_d_t  get_d_t  set_k_w  get_k_w)
  (torch_svm  -destructor  savexfile  loadxfile  forward  bcompute  torch_svm  set_n_support_vectors_bound  get_n_support_vectors_bound  set_n_support_vectors  get_n_support_vectors  set_sv_sequences  get_sv_sequences  set_sv_alpha  get_sv_alpha  set_support_vectors  get_support_vectors  set_b  get_b  set_kernel  get_kernel  set_data  get_data  set_io_sequence_array  get_io_sequence_array  set_sv_allocator  get_sv_allocator)
  (torch_svmcacheclassification  getcolumn  torch_svmcacheclassification  set_y  get_y  set_data  get_data)
  (torch_svmcacheregression  getcolumn  torch_svmcacheregression  set_n_examples  get_n_examples  set_data  get_data)
  (torch_pipexfile  -destructor  torch_pipexfile)
)
