def save(self, model_name):
     load_datasets.print_debug()
     print 'Saving the model file  '
     output = open('LogistRegression' + model_name, 'wb')
     pickle.dump(self.W.get_value(borrow=True).T, output, -1)
     pickle.dump(self.b.get_value(borrow=True).T, output, -1)
     pickle.dump(self.n_in, output, -1)
     #pickle.dump(self.n_out,output,-1);
     pickle.dump(self.n_classes, output, -1)
     output.close()
 def save(self,model_name):        
    load_datasets.print_debug();
    print 'Saving the model file  ';
    output = open('LogistRegression'+model_name, 'wb')
    pickle.dump(self.W.get_value(borrow=True).T, output,-1)
    pickle.dump(self.b.get_value(borrow=True).T, output,-1)
    pickle.dump(self.n_in,output,-1);
    #pickle.dump(self.n_out,output,-1);
    pickle.dump(self.n_classes,output,-1);            
    output.close()    
 def load(self, model_name):
     load_datasets.print_debug()
     print 'Loading the model file  '
     pkl_file = open('LogistRegression' + model_name, 'rb')
     aa = pickle.load(pkl_file)
     self.W.set_value(aa.T, borrow=True)
     bb = pickle.load(pkl_file)
     self.b.set_value(bb.T, borrow=True)
     self.n_out = pickle.load(pkl_file)
     self.n_classes = pickle.load(pkl_file)
     self.n_out = self.n_classes
     self.n_in = np.shape(aa)[1]
 def load(self,model_name):
    load_datasets.print_debug();
    print 'Loading the model file  ';         
    pkl_file = open('LogistRegression'+model_name,'rb')
    aa=pickle.load(pkl_file)
    self.W.set_value(aa.T,borrow=True);    
    bb=pickle.load(pkl_file);
    self.b.set_value(bb.T,borrow=True);
    self.n_out=pickle.load(pkl_file);
    self.n_classes=pickle.load(pkl_file);
    self.n_out=self.n_classes;        
    self.n_in=np.shape(aa)[1]