#################################
dcpg_train.py ./data/c1_000000-010000.h5 --cpg_model ./models/Smallwood2014_2i_cpg --out_dir ./models/cpg --fine_tune --nb_epoch 2 --nb_train_sample 1000 --nb_val_sample 1000
#################################
Using TensorFlow backend.
INFO (2017-03-05 19:20:27,727): Building model ...
Replicate names:
BS27_1_SER, BS27_3_SER, BS27_5_SER, BS27_6_SER, BS27_8_SER
INFO (2017-03-05 19:20:27,735): Loading existing CpG model ...
INFO (2017-03-05 19:20:27,736): Using model files ./models/Smallwood2014_2i_cpg/model.json ./models/Smallwood2014_2i_cpg/model_weights.h5
INFO (2017-03-05 19:20:28,772): Replicate names differ: Copying weights to new model ...
____________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
====================================================================================================
cpg/state (InputLayer) (None, 5, 50) 0
____________________________________________________________________________________________________
cpg/dist (InputLayer) (None, 5, 50) 0
____________________________________________________________________________________________________
cpg/merge_1 (Merge) (None, 5, 100) 0 cpg/state[0][0]
cpg/dist[0][0]
____________________________________________________________________________________________________
cpg/timedistributed_1 (TimeDistr (None, 5, 256) 25856 cpg/merge_1[0][0]
____________________________________________________________________________________________________
cpg/bidirectional_1 (Bidirection (None, 512) 787968 cpg/timedistributed_1[0][0]
____________________________________________________________________________________________________
cpg/dropout_1 (Dropout) (None, 512) 0 cpg/bidirectional_1[0][0]
____________________________________________________________________________________________________
cpg/BS27_1_SER (Dense) (None, 1) 513 cpg/dropout_1[0][0]
____________________________________________________________________________________________________
cpg/BS27_3_SER (Dense) (None, 1) 513 cpg/dropout_1[0][0]
____________________________________________________________________________________________________
cpg/BS27_5_SER (Dense) (None, 1) 513 cpg/dropout_1[0][0]
____________________________________________________________________________________________________
cpg/BS27_6_SER (Dense) (None, 1) 513 cpg/dropout_1[0][0]
____________________________________________________________________________________________________
cpg/BS27_8_SER (Dense) (None, 1) 513 cpg/dropout_1[0][0]
====================================================================================================
Total params: 816389
____________________________________________________________________________________________________
Layer trainability:
layer | trainable
---------------------------------
cpg/timedistributed_1 | False
cpg/bidirectional_1 | False
cpg/dropout_1 | False
INFO (2017-03-05 19:20:29,581): Computing output statistics ...
Output statistics:
name | nb_tot | nb_obs | frac_obs | mean | var
---------------------------------------------------------
cpg/BS27_1_SER | 1000 | 351 | 0.35 | 0.90 | 0.09
cpg/BS27_3_SER | 1000 | 146 | 0.15 | 0.79 | 0.16
cpg/BS27_5_SER | 1000 | 220 | 0.22 | 0.85 | 0.12
cpg/BS27_6_SER | 1000 | 336 | 0.34 | 0.67 | 0.22
cpg/BS27_8_SER | 1000 | 276 | 0.28 | 0.92 | 0.07
Class weights:
cpg/BS27_1_SER | cpg/BS27_3_SER | cpg/BS27_5_SER | cpg/BS27_6_SER | cpg/BS27_8_SER
----------------------------------------------------------------------------------
0=0.90 | 0=0.79 | 0=0.85 | 0=0.67 | 0=0.92
1=0.10 | 1=0.21 | 1=0.15 | 1=0.33 | 1=0.08
INFO (2017-03-05 19:20:29,862): Loading data ...
INFO (2017-03-05 19:20:29,864): Initializing callbacks ...
INFO (2017-03-05 19:20:29,865): Training model ...
Training samples: 1000
Epochs: 2
Learning rate: 0.0001
====================================================================================================
Epoch 1/2
====================================================================================================
done (%) | time | loss | acc | cpg/BS27_3_SER_loss | cpg/BS27_1_SER_loss | cpg/BS27_6_SER_loss | cpg/BS27_8_SER_loss | cpg/BS27_5_SER_loss | cpg/BS27_1_SER_acc | cpg/BS27_3_SER_acc | cpg/BS27_8_SER_acc | cpg/BS27_6_SER_acc | cpg/BS27_5_SER_acc
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12.8 | 0.0 | 0.4260 | 0.2876 | 0.0935 | 0.0511 | 0.0711 | 0.0703 | 0.1185 | 0.0889 | 0.6000 | 0.0882 | 0.1379 | 0.5227
25.6 | 0.0 | 0.3779 | 0.3107 | 0.0771 | 0.0522 | 0.0734 | 0.0597 | 0.0923 | 0.0955 | 0.6269 | 0.0569 | 0.1599 | 0.6143
38.4 | 0.0 | 0.3637 | 0.3138 | 0.0712 | 0.0471 | 0.0775 | 0.0551 | 0.0894 | 0.0875 | 0.5897 | 0.0588 | 0.1773 | 0.6559
51.2 | 0.0 | 0.3494 | 0.3247 | 0.0704 | 0.0472 | 0.0768 | 0.0509 | 0.0810 | 0.0976 | 0.5804 | 0.0644 | 0.1746 | 0.7062
64.0 | 0.0 | 0.3473 | 0.3295 | 0.0714 | 0.0467 | 0.0810 | 0.0454 | 0.0802 | 0.1019 | 0.6063 | 0.0515 | 0.1859 | 0.7018
76.8 | 0.0 | 0.3472 | 0.3322 | 0.0736 | 0.0444 | 0.0838 | 0.0426 | 0.0806 | 0.0988 | 0.6256 | 0.0524 | 0.1909 | 0.6932
89.6 | 0.0 | 0.3368 | 0.3379 | 0.0710 | 0.0434 | 0.0839 | 0.0392 | 0.0773 | 0.0903 | 0.6358 | 0.0568 | 0.1954 | 0.7114
100.0 | 0.0 | 0.3433 | 0.3480 | 0.0708 | 0.0464 | 0.0857 | 0.0401 | 0.0785 | 0.1055 | 0.6445 | 0.0695 | 0.2076 | 0.7130
Epoch 00000: loss improved from inf to 0.34332, saving model to ./models/cpg/model_weights_val.h5
split | loss | acc | cpg/BS27_3_SER_loss | cpg/BS27_8_SER_loss | cpg/BS27_1_SER_loss | cpg/BS27_6_SER_loss | cpg/BS27_5_SER_loss | cpg/BS27_3_SER_acc | cpg/BS27_6_SER_acc | cpg/BS27_8_SER_acc | cpg/BS27_5_SER_acc | cpg/BS27_1_SER_acc
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
train | 0.3433 | 0.3480 | 0.0708 | 0.0401 | 0.0464 | 0.0857 | 0.0785 | 0.6445 | 0.2076 | 0.0695 | 0.7130 | 0.1055
Learning rate: 9.75e-05
====================================================================================================
Epoch 2/2
====================================================================================================
done (%) | time | loss | acc | cpg/BS27_3_SER_loss | cpg/BS27_1_SER_loss | cpg/BS27_6_SER_loss | cpg/BS27_8_SER_loss | cpg/BS27_5_SER_loss | cpg/BS27_1_SER_acc | cpg/BS27_3_SER_acc | cpg/BS27_8_SER_acc | cpg/BS27_6_SER_acc | cpg/BS27_5_SER_acc
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12.8 | 0.0 | 0.3435 | 0.4013 | 0.0811 | 0.0311 | 0.0910 | 0.0470 | 0.0736 | 0.0750 | 0.7838 | 0.1892 | 0.2821 | 0.6765
25.6 | 0.1 | 0.3261 | 0.3615 | 0.0656 | 0.0358 | 0.0917 | 0.0364 | 0.0771 | 0.0970 | 0.6597 | 0.1074 | 0.2331 | 0.7103
38.4 | 0.1 | 0.3414 | 0.3604 | 0.0674 | 0.0385 | 0.0948 | 0.0360 | 0.0853 | 0.1053 | 0.6398 | 0.1272 | 0.2286 | 0.7012
51.2 | 0.1 | 0.3441 | 0.3664 | 0.0680 | 0.0459 | 0.0859 | 0.0377 | 0.0872 | 0.1225 | 0.6443 | 0.1224 | 0.2232 | 0.7196
64.0 | 0.1 | 0.3436 | 0.3729 | 0.0629 | 0.0472 | 0.0885 | 0.0392 | 0.0864 | 0.1370 | 0.6207 | 0.1403 | 0.2157 | 0.7507
76.8 | 0.1 | 0.3285 | 0.3756 | 0.0590 | 0.0470 | 0.0837 | 0.0384 | 0.0811 | 0.1367 | 0.6222 | 0.1345 | 0.2200 | 0.7645
89.6 | 0.1 | 0.3297 | 0.3798 | 0.0583 | 0.0481 | 0.0877 | 0.0384 | 0.0779 | 0.1426 | 0.6180 | 0.1269 | 0.2308 | 0.7807
100.0 | 0.1 | 0.3315 | 0.3844 | 0.0610 | 0.0492 | 0.0879 | 0.0358 | 0.0784 | 0.1563 | 0.6242 | 0.1137 | 0.2470 | 0.7808
Epoch 00001: loss improved from 0.34332 to 0.33151, saving model to ./models/cpg/model_weights_val.h5
split | loss | acc | cpg/BS27_3_SER_loss | cpg/BS27_8_SER_loss | cpg/BS27_1_SER_loss | cpg/BS27_6_SER_loss | cpg/BS27_5_SER_loss | cpg/BS27_3_SER_acc | cpg/BS27_6_SER_acc | cpg/BS27_8_SER_acc | cpg/BS27_5_SER_acc | cpg/BS27_1_SER_acc
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
train | 0.3315 | 0.3844 | 0.0610 | 0.0358 | 0.0492 | 0.0879 | 0.0784 | 0.6242 | 0.2470 | 0.1137 | 0.7808 | 0.1563
====================================================================================================
Training set performance:
loss | acc | cpg/BS27_3_SER_loss | cpg/BS27_8_SER_loss | cpg/BS27_1_SER_loss | cpg/BS27_6_SER_loss | cpg/BS27_5_SER_loss | cpg/BS27_3_SER_acc | cpg/BS27_6_SER_acc | cpg/BS27_8_SER_acc | cpg/BS27_5_SER_acc | cpg/BS27_1_SER_acc
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0.3433 | 0.3480 | 0.0708 | 0.0401 | 0.0464 | 0.0857 | 0.0785 | 0.6445 | 0.2076 | 0.0695 | 0.7130 | 0.1055
0.3315 | 0.3844 | 0.0610 | 0.0358 | 0.0492 | 0.0879 | 0.0784 | 0.6242 | 0.2470 | 0.1137 | 0.7808 | 0.1563
INFO (2017-03-05 19:20:41,962): Done!
Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x1147d1cc0>>
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 522, in __del__
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 518, in close
AttributeError: 'NoneType' object has no attribute 'raise_exception_on_not_ok_status'