thoughtworksarts / EmoPy

A deep neural net toolkit for emotion analysis via Facial Expression Recognition (FER)
https://thoughtworksarts.io/blog/emopy-emotional-expression-toolkit/
GNU Affero General Public License v3.0
919 stars 264 forks source link

Training stops #73

Closed d4rkm0nkey closed 3 years ago

d4rkm0nkey commented 3 years ago

When I start the convolutional model example with "python convolutional_model.py" the training already stops after 3 epochs without an error message. The same happens for other models. On another computer it stops after round about 8 epochs if I set the epochs to something higher than 5.

absl-py==0.11.0 astor==0.8.1 astunparse==1.6.3 attrs==20.3.0 cached-property==1.5.2 cachetools==4.1.1 certifi==2020.6.20 chardet==3.0.4 coverage==4.5.3 cycler==0.10.0 decorator==4.4.2 -e git+https://github.com/thoughtworksarts/EmoPy.git@be1e6ba640384bbcbb43439886d855890dc78c3a#egg=EmoPy gast==0.3.3 google-auth==1.23.0 google-auth-oauthlib==0.4.2 google-pasta==0.2.0 graphviz==0.14.2 grpcio==1.33.2 h5py==2.10.0 idna==2.10 imageio==2.9.0 importlib-metadata==2.0.0 iniconfig==1.1.1 joblib==0.17.0 Keras==2.2.4 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 Lasagne==0.1 Markdown==3.3.3 matplotlib==3.2.2 mock==4.0.2 networkx==2.5 numpy==1.17.4 oauthlib==3.1.0 opencv-python==4.4.0.46 opt-einsum==3.3.0 packaging==20.4 Pillow==8.0.1 pluggy==0.13.1 protobuf==3.13.0 py==1.9.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pydot==1.4.1 pyparsing==2.4.7 pytest==6.1.2 python-dateutil==2.8.1 PyWavelets==1.1.1 PyYAML==5.3.1 requests==2.24.0 requests-oauthlib==1.3.0 rsa==4.6 scikit-image==0.16.2 scikit-learn==0.23.2 scikit-neuralnetwork==0.7 scipy==1.0.0 six==1.15.0 tb-nightly==1.14.0a20190603 tensorboard==1.13.1 tensorboard-plugin-wit==1.7.0 tensorflow==1.13.1 tensorflow-estimator==1.13.0 termcolor==1.1.0 Theano==1.0.5 threadpoolctl==2.1.0 tifffile==2020.9.3 toml==0.10.2 urllib3==1.25.11 Werkzeug==1.0.1 wrapt==1.12.1 zipp==3.4.0

Aronja commented 3 years ago

Hi @d4rkm0nkey

Thanks for the question. If you check the convolutional_model.py, you can see that it is importing the ConvolutionalNN from src/neuralnets. In this model (or actually in the abstract class it is inheriting from) the patients for EarlyStopping is defined as 3. That means if your accuracy stays the same for 3 Epochs, the script will stop early.

Check out the code snipped below

https://github.com/thoughtworksarts/EmoPy/blob/43428c746997a04cde16cde3fa65d5cd03c97ab3/EmoPy/src/neuralnets.py#L35-L39

Aronja commented 3 years ago

I'm closing this issue as there haven't been any replies in over a month