Seanlinx / mtcnn

593 stars 264 forks source link

I get an error : "convolution4_weights is not in the arguments" when I load the new trained models #29

Open Rainy000 opened 7 years ago

Rainy000 commented 7 years ago

I finish the train and test process and get correct results before I change the network structure, but I get an error: " ValueError: Find name "convolution4_weights" that is not in the arguments " when I load the new models trained by the changed network structure . I change the Pnet Rnet and Onet with same method, and locate the error at the RNet = Detector( R_Net("test"), 24, batch_size[1], ctx, args, auxs) in demo.py file --> executor.copy_params_from( self.arg_params, self.aux_params) in detector.py file. I try to replace above sentence with executor.copy_params_from( self.arg_params, self.aux_params, allow_extra_params=True), and load the new models with no error informations ,but some mistakes show that the boxes_c is notype and can not operate copy manipulation at mtcnn_detector.detect_rnet(img,boxes_c) in demo.py file. Is anybody encounter these error? I also want to know if the detector.py have to be changed according to the changed network structure in symbol.py?

Seanlinx commented 7 years ago

Something like AttributeError: 'NoneType' object has no attribute 'copy' ? That means pnet didn't detect any faces

Rainy000 commented 7 years ago

@Seanlinx But each epoch log and loss metric on sample sets show that the new trained models (Pnet Rnet Onet)have good performance. accuracy rate above 95% and loss rate also very small(I can't remenber the specific percentage).