yu4u / age-gender-estimation

Keras implementation of a CNN network for age and gender estimation
MIT License
1.47k stars 503 forks source link

Error in `python3': double free or corruption (!prev): #58

Open SherlockHua1995 opened 6 years ago

SherlockHua1995 commented 6 years ago

Hello yu4u,when I run 'python3 train.py --input data/imdb_db.mat' , (ubuntu14.04, python3.5,cuda8.0,cudnn5.0,tensorflow1.0.1) the print log is as follows: Using TensorFlow backend. I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally DEBUG:root:Loading data... DEBUG:root:image_dim_ordering = 'tf' DEBUG:root:Creating model... DEBUG:root:Model summary...


DEBUG:root:Saving model... DEBUG:root:Running training... Train on 154666 samples, validate on 17186 samples W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.

Can u give me some advice about this ?

yu4u commented 6 years ago

https://github.com/tensorflow/tensorflow/issues/6968 related this issue?

SherlockHua1995 commented 6 years ago

Thanks a lot. I have solved this problem. And one more question, how to get the model graph?

yu4u commented 6 years ago

What did you mean by "the model graph"? The model graph for TensorFlow?

SherlockHua1995 commented 6 years ago

What did you mean by "the model graph"? The model graph for TensorFlow? Thanks for your reply. Yes. I want to check the model graph for TensorFlow .

yu4u commented 6 years ago

You can search the way to do so. https://github.com/keras-team/keras/issues/3223

SherlockHua1995 commented 6 years ago

Thanks you for your advice. There is another doubt, would you please give some suggestion. You trained the network by "python3 train.py --input data/imdb_db.mat" from scratch and didn't finetune it by other data set and the best val_loss is to 3.969. The best val_loss was improved from 3.969 to 3.731:

Without data augmentation: 3.969
With standard data augmentation: 3.799
With mixup and random erasing: 3.731

How about the finetuned result and in this project there is no script for training on pretrained models, right? Best wishes.

yu4u commented 6 years ago

All the above results were obtained by training from scratch. There is no script for fine-tuning.

Without data augmentation: 3.969
-> python3 train.py --input data/imdb_db.mat

With standard data augmentation: 3.799
-> N/A

With mixup and random erasing: 3.731
-> python3 train.py --input data/imdb_db.mat --aug
SherlockHua1995 commented 6 years ago

Thanks a lot. when evaluating the trained model, the result is: The results of pretrained model is:

MAE Apparent: 6.06 MAE Real: 7.38

The best result reported in [5] is:

MAE Apparent: 4.08 MAE Real: 5.30 So I doubt that you first pretrained and finetuned and achieve the MAE Apparent :6.06, and this is only for age ,not for gender. To evaluate a age-gender-estimation model , MAE and delta-error are both applicable .Any way , I am confused about the quantitative evaluation protocol about age and gender respectively.

yu4u commented 6 years ago

The APPA-REAL dataset is used to obtain the above results, and the dataset does not include gender lables. Thus only MAE for age estimation is shown.