chen0040 / keras-english-resume-parser-and-analyzer

keras project that parses and analyze english resumes
MIT License
269 stars 144 forks source link

Zero Size Error Reduction Operation #18

Open rajabose opened 4 years ago

rajabose commented 4 years ago

I am getting the following error while running the training file.

2020-03-16 22:42:48.232059: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-03-16 22:42:48.255069: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f8cebe02f00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-03-16 22:42:48.255094: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
  File "dl_based_parser_train.py", line 30, in <module>
    main()
  File "dl_based_parser_train.py", line 26, in main
    random_state=random_state)
  File "../keras_en_parser_and_analyzer/library/dl_based_parser.py", line 42, in fit
    random_state=random_state)
  File "../keras_en_parser_and_analyzer/library/dl_based_parser.py", line 66, in fit_line_label
    random_state=random_state)
  File "../keras_en_parser_and_analyzer/library/classifiers/lstm.py", line 360, in fit
    Y = np_utils.to_categorical(ys, len(self.labels))
  File "/Users/rajabose/.pyenv/versions/keras-parser/lib/python3.7/site-packages/keras/utils/np_utils.py", line 49, in to_categorical
    num_classes = np.max(y) + 1
  File "<__array_function__ internals>", line 6, in amax
  File "/Users/rajabose/.pyenv/versions/keras-parser/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2668, in amax
    keepdims=keepdims, initial=initial, where=where)
  File "/Users/rajabose/.pyenv/versions/keras-parser/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
usman87626 commented 4 years ago

You are getting the error because you skipped the "annotation GUI screen" This step involves creating .txt files in data/training_data that are then loaded for training As you skipped that step, there are no .txt files That's the reason,You are getting this error.

NOTE: I also got the same error,if still not solved,please let me know

ylmz-dev commented 4 years ago

When I am trying to use gui screen for training data I can't see the end of the file and I can't submit it? Could you please help me guys?