-
Notifications
You must be signed in to change notification settings - Fork 73
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
ValueError: need at least one array to concatenate #15
Comments
Hello,
based on these outputs:
Training set: n_subjects=0
Number of examples = 0
There might be no files in this directory data_dir.
You can debug the code and check if there are any files in the data_dir
path, also you can put a breakpoint at the below line and check this.
https://github.com/MousaviSajad/SleepEEGNet/blob/2fcd73c8d5c2d499fbb78300392f432c3f3b4f3e/dataloader.py#L105
Regards,
Sajad
…On Thu, Feb 11, 2021 at 6:30 AM AzadehGh ***@***.***> wrote:
Hello
according to https://github.com/genaris/deepsleepnet I made some changes
to run this code on Python 3.7. after solving some warnings about packages
compatibility this error is not solved yet:
(Python f) F:\PhD\5th semester\Deep Learning\project\Python f>python
seq2seq_sleep_sleep-EDF.py --data_dir data_2013/eeg_fpz_cz --output_dir
output_2013 --n_folds 6
2021-02-11 14:47:47.456383
========== [Fold-0] ==========
Load training set:
Load Test set:
Training set: n_subjects=0
Number of examples = 0
Traceback (most recent call last):
File "seq2seq_sleep_sleep-EDF.py", line 757, in
tf.app.run()
File "F:\PhD\5th semester\Deep Learning\project\Python
f\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "seq2seq_sleep_sleep-EDF.py", line 755, in main
run_program(hparams,FLAGS)
File "seq2seq_sleep_sleep-EDF.py", line 500, in run_program
X_train, y_train, X_test, y_test =
data_loader.load_data(seq_len=hparams.max_time_step)
File "F:\PhD\5th semester\Deep Learning\project\Python f\dataloader.py",
line 160, in load_data
self.print_n_samples_each_class(np.hstack(label_train),self.classes)
File "F:\PhD\5th semester\Deep Learning\project\Python
f\lib\site-packages\numpy\core\shape_base.py", line 340, in hstack
return _nx.concatenate(arrs, 1)
ValueError: need at least one array to concatenate
it seems that the data is not loaded. I would appreciate if you could let
me know the solution.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4D7SPCUATNDE6QBT5OFYTS6O5TXANCNFSM4XOVG3OA>
.
|
Hello |
Hi again |
Hi,
You should change n_folds to num_folds like the below line:
python seq2seq_sleep_sleep-EDF.py --data_dir data_2013/eeg_fpz_cz
--output_dir output_2013 --num_folds 20
or change the number of folds here
https://github.com/MousaviSajad/SleepEEGNet/blob/924cce632076c39fce2b7cb081bc6d0f59c8ebb6/seq2seq_sleep_sleep-EDF.py#L729
Regards,
Sajad
…On Mon, Feb 15, 2021 at 10:32 PM AzadehGh ***@***.***> wrote:
Hi again
I guess because the name in data loader is n_folds but in
sleep_sleep_seq2seq is num_folds. shouldn't these to have the same name?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4D7SOV4LTL6IIKX3T6SEDS7HRMLANCNFSM4XOVG3OA>
.
|
Hi |
It should have worked! or to debug, you can track the value of num_folds by
printing it.
Regards,
Sajad
…On Tue, Feb 16, 2021 at 10:20 PM AzadehGh ***@***.***> wrote:
Hi
thanks a lot for your answer. I did both of them. but unfortunately it
didn't work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4D7SMOR7SIUKJ3TB2TDVDS7MYYDANCNFSM4XOVG3OA>
.
|
Hello
according to https://github.com/genaris/deepsleepnet I made some changes to run this code on Python 3.7. after solving some warnings about packages compatibility this error is not solved yet:
(Python f) F:\PhD\5th semester\Deep Learning\project\Python f>python seq2seq_sleep_sleep-EDF.py --data_dir data_2013/eeg_fpz_cz --output_dir output_2013 --n_folds 6
2021-02-11 14:47:47.456383
========== [Fold-0] ==========
Load training set:
Load Test set:
Training set: n_subjects=0
Number of examples = 0
Traceback (most recent call last):
File "seq2seq_sleep_sleep-EDF.py", line 757, in
tf.app.run()
File "F:\PhD\5th semester\Deep Learning\project\Python f\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "seq2seq_sleep_sleep-EDF.py", line 755, in main
run_program(hparams,FLAGS)
File "seq2seq_sleep_sleep-EDF.py", line 500, in run_program
X_train, y_train, X_test, y_test = data_loader.load_data(seq_len=hparams.max_time_step)
File "F:\PhD\5th semester\Deep Learning\project\Python f\dataloader.py", line 160, in load_data
self.print_n_samples_each_class(np.hstack(label_train),self.classes)
File "F:\PhD\5th semester\Deep Learning\project\Python f\lib\site-packages\numpy\core\shape_base.py", line 340, in hstack
return _nx.concatenate(arrs, 1)
ValueError: need at least one array to concatenate
it seems that the data is not loaded. I would appreciate if you could let me know the solution.
The text was updated successfully, but these errors were encountered: