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

IndexError: too many indices for array #57

Open
misterbean01 opened this issue Nov 9, 2021 · 0 comments
Open

IndexError: too many indices for array #57

misterbean01 opened this issue Nov 9, 2021 · 0 comments

Comments

@misterbean01
Copy link

I was able to clone the github project on Google Colab then installed the packages as close as possible to the ones specified on Readme:
!pip install tensorflow==1.13.1
!pip install numpy==1.15.4
!pip install scipy==1.1.0
!pip install scikit-learn==0.20.0

Unfortunately I have been hitting and IndexError after Epoch 0:

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
[n_users, n_items]=[70679, 24915]
[n_train, n_test]=[652514, 193920]
[n_entities, n_relations, n_triples]=[113487, 39, 2557746]
[batch_size, batch_size_kg]=[1024, 4015]
convert ratings into adj mat done.
convert 80 relational triples into adj mat done. @1.7324s
/content/drive/My Drive/Colab Notebooks/TCSS 593/knowledge_graph_attention_network/Model/utility/loader_kgat.py:87: RuntimeWarning: divide by zero encountered in power
d_inv = np.power(rowsum, -1).flatten()
generate si-normalized adjacency matrix.
reordering indices...
reorganize all kg data done.
sort meta-data done.
sort all data done.
load the pretrained bprmf model parameters.

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
using pretrained initialization
WARNING:tensorflow:From /content/drive/My Drive/Colab Notebooks/TCSS 593/knowledge_graph_attention_network/Model/KGAT.py:289: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
#params: 12146384
without pretraining.
Epoch 0 [5124.6s]: train==[434.08832=14.35307 + 419.35645 + 0.37843]
Traceback (most recent call last):
File "Main.py", line 342, in
best_rec_0 = max(recs[:, 0])
IndexError: too many indices for array

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