ibalazevic / TuckER

TuckER: Tensor Factorization for Knowledge Graph Completion
MIT License
350 stars 60 forks source link

arguments have invalid types: (numpy.ndarray) in "main.py", line 82 #9

Closed sybilOO closed 5 years ago

sybilOO commented 5 years ago

sort_idxs is numpy and e2_idx is torch I changed the line 82 in main.py like below , and it worked rank = np.where(sort_idxs[j]==e2_idx.cpu().numpy()[j])[0][0]

ibalazevic commented 5 years ago

Thanks, that was due to me using the old version of pytorch and numpy, just updated the code to pytorch 1.0.1 and numpy to 1.15.1, should be fixed.