示例#1
0
 def init(self):
    self.bowfilename=self.directory+"/bagofwords.pcl"
    try:
       self.ibow=BagOfWords.load(self.bowfilename)
       if (self.ibow==None):
           raise Exception
       self.model_node.status=genericmodel.STATUS_READY
       pycvf_debug(10, "loaded"+ self.bowfilename+"...")
       pycvf_debug(10,"burnin is "+ str(self.ibow.burnin)+"...")
    except:
       self.ibow=BagOfWords(self.categories,burnin=self.burnin)
       self.ibow.set_filename(self.bowfilename)
       self.model_node.status=genericmodel.STATUS_NOT_READY
       
    #genericmodel.Model.init(self,*args,**kwargs)
    pycvf_debug(10,"burnin is "+ str(self.ibow.burnin)+"...")