Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about zerodivisionerror #18

Open
JasonYorkPig opened this issue Apr 8, 2019 · 3 comments
Open

about zerodivisionerror #18

JasonYorkPig opened this issue Apr 8, 2019 · 3 comments

Comments

@JasonYorkPig
Copy link

hello amine!
I tried to train 5 emotions with using landmarks.
the train environment is like this:

  • emotions = 5
  • model = B
  • optimizer = 'momentum'
  • learning_rate = 0.016
  • learning_rate_decay = 0.864
  • otimizer_param (momentum) = 0.95
  • keep_prob = 0.956
  • epochs = 100
  • use landmarks = True
  • use hog + landmarks = False
  • use hog sliding window + landmarks = False
  • use batchnorm after conv = True
  • use batchnorm after fc = False_

and I also changed [output_size=5] in parameters.py. but when I tried to train,

Traceback (most recent call last):
File "train.py", line 124, in
train()
File "train.py", line 60, in train
n_epoch=TRAINING.epochs)
File "/anaconda3/envs/tf/lib/python3.6/site-packages/tflearn/models/dnn.py", line 216, in fit
callbacks=callbacks)
File "/anaconda3/envs/tf/lib/python3.6/site-packages/tflearn/helpers/trainer.py", line 339, in fit
show_metric)
File "/anaconda3/envs/tf/lib/python3.6/site-packages/tflearn/helpers/trainer.py", line 847, in _train
e = evaluate_flow(self.session, eval_ops, self.test_dflow)
File "/anaconda3/envs/tf/lib/python3.6/site-packages/tflearn/helpers/trainer.py", line 1003, in evaluate_flow
res = [r / dataflow.n_samples for r in res]
File "/anaconda3/envs/tf/lib/python3.6/site-packages/tflearn/helpers/trainer.py", line 1003, in
res = [r / dataflow.n_samples for r in res]
ZeroDivisionError: float division by zero

Is there anything else that needs to be fixed? :)

@amineHorseman
Copy link
Owner

Can you add a print statement before line 55 to check the size of data['X'], data['X2'] and data['Y']?

@JasonYorkPig
Copy link
Author

JasonYorkPig commented Apr 29, 2019

What I found was that when I specify the emotions, skip two or more label numbers(0,2,4) then the ZeroDivisionError was happened.

@LauraKag
Copy link

I have the exact same issue...how can I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants