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

ZeroDivisionError: float division by zero #4

Open
hamidhaghdoost opened this issue Apr 12, 2019 · 0 comments
Open

ZeroDivisionError: float division by zero #4

hamidhaghdoost opened this issue Apr 12, 2019 · 0 comments

Comments

@hamidhaghdoost
Copy link

Hi, I have following error when I want to train_batch() my model

ZeroDivisionError                         Traceback (most recent call last)
<ipython-input-13-a2ffe646197f> in <module>
     10 
     11 model.train_batch(max_epochs=1000, 
---> 12                  max_iterations_first=1
     13                  )

~/anaconda3/lib/python3.7/site-packages/flatcat/flatcat.py in train_batch(self, min_iteration_cost_gain, min_epoch_cost_gain, max_epochs, max_iterations_first, max_iterations, max_resegment_iterations, max_shift_distance, min_shift_remainder)
    861         msg = 'Must initialize model and tag corpus before training'
    862         assert self._corpus_tagging_level == "full", msg
--> 863         self._epoch_update(no_increment=True)
    864         previous_cost = self.get_cost()
    865         wl_force_another = False

~/anaconda3/lib/python3.7/site-packages/flatcat/flatcat.py in _epoch_update(self, no_increment)
   1650             _logger.info('Cost balance (W Corp / W Anno): {}'.format(
   1651                 self._corpus_coding.get_cost() /
-> 1652                 self._annot_coding.get_cost()))
   1653 
   1654         self._operation_number = 0

ZeroDivisionError: float division by zero
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

1 participant