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

Model diverged while predicting #45

Open
cyberfag opened this issue Oct 12, 2021 · 0 comments
Open

Model diverged while predicting #45

cyberfag opened this issue Oct 12, 2021 · 0 comments

Comments

@cyberfag
Copy link

Hello. After successfull training, I'm trying to predict stages using the command given (python predict.py --data_dir data/eeg_fpz_cz --model_dir output --output_dir output) using my directories of course. But it returns the following error:

Traceback (most recent call last):
  File "predict.py", line 705, in <module>
    tf.compat.v1.app.run()
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\platform\app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 312, in run
    _run_main(main, args)
  File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\absl\app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "predict.py", line 700, in main
    n_subjects_per_fold=n_subjects_per_fold
  File "predict.py", line 651, in predict
    subject_idx=subject_idx
  File "predict.py", line 561, in custom_run_epoch
    "Model diverged with loss = NaN"
AssertionError: Model diverged with loss = NaN

It seems like your model is trying to perform some more finetuning or something but I just want to use the saved trained model, forward pass and get the predicted labels. Is it possible in this simple way?

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