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

all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 3 and the array at index 1 has size 20 #10

Open
attilaimre99 opened this issue Sep 10, 2022 · 2 comments

Comments

@attilaimre99
Copy link

attilaimre99 commented Sep 10, 2022

Hi!

I've been exploring some self-made datasets and I've managed to get the project up'n running fine. The training runs well except sometimes this error happens:

F1 Score: 0.764872521246459
Accuracy: 0.7331189710610932
MCC: 0.48423538939278077
Precision: 0.6835443037974683
Recall: 0.8681672025723473
ROC AUC: 0.7331189710610932
Epoch 215 | Test Loss 0.5649742603302002
Early stopping due to no improvement.
  0%|                                                                        | 0/100 [14:09<?, ?it/s]
Traceback (most recent call last):
  File "train.py", line 191, in <module>
    results = tuner.minimize()
  File "/opt/conda/lib/python3.7/site-packages/mango/tuner.py", line 153, in minimize
    return self.run()
  File "/opt/conda/lib/python3.7/site-packages/mango/tuner.py", line 140, in run
    self.results = self.runBayesianOptimizer()
  File "/opt/conda/lib/python3.7/site-packages/mango/tuner.py", line 263, in runBayesianOptimizer
    X_sample = np.vstack((X_sample, X_next_batch))
  File "<__array_function__ internals>", line 6, in vstack
  File "/opt/conda/lib/python3.7/site-packages/numpy/core/shape_base.py", line 282, in vstack
    return _nx.concatenate(arrs, 0)
  File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 3 and the array at index 1 has size 20

As you can see this happens at the 0th epoch.

@rajgupta-ml
Copy link

@attilaimre99 Hey did you get the solution for this array

@deepfindr
Copy link
Owner

Hi :) this usually occurs when your array dimensions don't match.

Double-check if all graphs have the same dimensions for x and edge_attr. Could be that some of your samples are invalid?

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