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

When I am running this project, I meet a question #4

Open
Beliefzp opened this issue Aug 13, 2022 · 3 comments
Open

When I am running this project, I meet a question #4

Beliefzp opened this issue Aug 13, 2022 · 3 comments

Comments

@Beliefzp
Copy link

My problem is : IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices

I have found many methods to deal with this problem, but nothing is useful. Many people in Google said that we should use 'int' in this code, but this also do nothing.

This problem is in sampling.py ,line 77 "label_patches = label_patches[label_selector]"

I am very nervous,can you help me.

Thank you!

@Beliefzp Beliefzp changed the title When I an running this project, I meet a question When I am running this project, I meet a question Aug 13, 2022
@Tracy-git
Copy link

我的问题是:IndexError:只有整数、切片 ( :)、省略号 ( ...)、numpy.newaxis ( None) 和整数或布尔数组是有效索引

我找到了很多方法来处理这个问题,但没有一个有用。谷歌的很多人说我们应该在这段代码中使用'int',但这也没有做任何事情。

这个问题在 sampling.py 中,第 77 行“label_patches = label_patches[label_selector]”

我很紧张,你能帮帮我吗?

谢谢你!

have you solve it ? thx

@Beliefzp
Copy link
Author

Beliefzp commented May 11, 2023 via email

@Tracy-git
Copy link

收到,我下午回来看这个问题
……
---Original--- From: @.> Date: Thu, May 11, 2023 14:29 PM To: @.>; Cc: @.@.>; Subject: Re: [josedolz/HyperDenseNet_pytorch] When I am running this project,I meet a question (Issue #4) 我的问题是:IndexError:只有整数、切片 ( :)、省略号 ( ...)、numpy.newaxis ( None) 和整数或布尔数组是有效索引 我找到了很多方法来处理这个问题,但没有一个有用。谷歌的很多人说我们应该在这段代码中使用'int',但这也没有做任何事情。 这个问题在 sampling.py 中,第 77 行“label_patches = label_patches[label_selector]” 我很紧张,你能帮帮我吗? 谢谢你! have you solve it ? thx — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

maybe you can convert label_selector to a tuple , problems seems solved

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

2 participants