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

InvalidArgumentError: flat indices[117, :] = [2, 7] does not index into param (shape: [7,7,512]). #22

Closed
happyday521 opened this issue Oct 25, 2018 · 6 comments

Comments

@happyday521
Copy link

When I run "python demo.py --image utils/examples/plane.png" , I meet the problem:

InvalidArgumentError (see above for traceback): flat indices[117, :] = [2, 7] does not index into param (shape: [7,7,512]).
[[Node: graphprojection_1/GatherNd_13 = GatherNd[Tindices=DT_INT32, Tparams=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](gcn/Squeeze_3, graphprojection_1/stack_13)]]

However, I didn't change anything.
My TF is 1.9 and Cuda is 9.0 , I compile my own cd_dist.so. I didn't know what is wrong. Can anyone help me ? Thanks very much!

@jspih
Copy link

jspih commented Oct 25, 2018

I also have this issue, but on tensorflow 1.3 and cuda 10.0.

@jspih
Copy link

jspih commented Oct 25, 2018

I even installed cuda version 8.0, is there a specific numpy version that was used? Or any other versions?

@jspih
Copy link

jspih commented Oct 25, 2018

Fixed it!

From a different issue

I ran into the same error. It looks like changing the following two lines in layers.py:

x2 = tf.ceil(x)

and

y2 = tf.ceil(y)

into

x2 = tf.minimum(tf.ceil(x), tf.cast(tf.shape(img_feat)[0], tf.float32) - 1)

and

y2 = tf.minimum(tf.ceil(y), tf.cast(tf.shape(img_feat)[1], tf.float32) - 1)

will bypass the error. Not sure if this is the correct solution.

Then make sure to run python setup.py install again

@happyday521
Copy link
Author

@jspih Thanks very much! I will try!

@happyday521
Copy link
Author

GPU version doesn‘t have any problem. However, CPU should modify x2 and y2.

@zshyang
Copy link

zshyang commented Sep 15, 2020

Hi,
Do you know how to download the dataset and unzip it from the link below?
https://drive.google.com/open?id=131dH36qXCabym1JjSmEpSQZg4dmZVQid

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