Example #1
0
 def on_algorithm_changed(self,radiomenuitem,data=None):
     """This function is called whenever the radiomenuitem 
     state is changed. This sets the algorithm of the 
     training network."""
     if self.algo_inc.get_active():
         self.algorithm_name="FANN_TRAIN_INCREMENTAL"
         self.incremental.set_active(True)
         self.algorithm=True
     elif self.algo_batch.get_active():
         self.algorithm_name="FANN_TRAIN_BATCH"
         self.batch.set_active(True)
         self.algorithm=True
     elif self.algo_rprop.get_active():
         self.algorithm_name="FANN_TRAIN_RPROP"
         self.rprop.set_active(True)
         if self.rpropw==None:
             self.rpropw=rprop()
             self.qpropw=None
         self.algorithm=True
     elif self.algo_qprop.get_active():
         self.algorithm_name="FANN_TRAIN_QUICKPROP"
         self.qprop.set_active(True)
         if self.qpropw==None:
             self.qpropw=qprop()
             self.rpropw=None
         self.algorithm=True
     db=dbm.open('config.dat','c')
     db['Training Algorithm']=self.algorithm_name
     db.close()
Example #2
0
 def on_algorithm_changed(self, radiomenuitem, data=None):
     """This function is called whenever the radiomenuitem 
     state is changed. This sets the algorithm of the 
     training network."""
     if self.algo_inc.get_active():
         self.algorithm_name = "FANN_TRAIN_INCREMENTAL"
         self.incremental.set_active(True)
         self.algorithm = True
     elif self.algo_batch.get_active():
         self.algorithm_name = "FANN_TRAIN_BATCH"
         self.batch.set_active(True)
         self.algorithm = True
     elif self.algo_rprop.get_active():
         self.algorithm_name = "FANN_TRAIN_RPROP"
         self.rprop.set_active(True)
         if self.rpropw == None:
             self.rpropw = rprop()
             self.qpropw = None
         self.algorithm = True
     elif self.algo_qprop.get_active():
         self.algorithm_name = "FANN_TRAIN_QUICKPROP"
         self.qprop.set_active(True)
         if self.qpropw == None:
             self.qpropw = qprop()
             self.rpropw = None
         self.algorithm = True
     db = dbm.open('config.dat', 'c')
     db['Training Algorithm'] = self.algorithm_name
     db.close()
Example #3
0
 def on_talgo_ok_button_clicked(self, widget, data=None):
     """Handler for ok button in talgo window"""
     self.talgo_window.hide()
     if self.rprop.get_active():
         if self.rpropw == None:
             self.rpropw = rprop()
             self.qpropw = None
             self.algo_rprop.set_active(True)
     elif self.qprop.get_active():
         if self.qpropw == None:
             self.qpropw = qprop()
             self.rpropw = None
             self.algo_qprop.set_active(True)
Example #4
0
 def on_talgo_ok_button_clicked(self,widget,data=None):
     """Handler for ok button in talgo window"""
     self.talgo_window.hide()
     if self.rprop.get_active():
         if self.rpropw==None:
             self.rpropw=rprop()
             self.qpropw=None
             self.algo_rprop.set_active(True)
     elif self.qprop.get_active():
         if self.qpropw==None:
             self.qpropw=qprop()
             self.rpropw=None
             self.algo_qprop.set_active(True)