HyperDenseNet_pytorch icon indicating copy to clipboard operation
HyperDenseNet_pytorch copied to clipboard

When I am running this project, I meet a question

Open Beliefzp opened this issue 1 year ago • 3 comments

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 avatar Aug 13 '22 12:08 Beliefzp

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

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

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

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

谢谢你!

have you solve it ? thx

Tracy-git avatar May 11 '23 06:05 Tracy-git

收到,我下午回看看这个问题

---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: @.***>

Beliefzp avatar May 11 '23 06:05 Beliefzp

收到,我下午回来看这个问题 …… ---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

Tracy-git avatar May 11 '23 08:05 Tracy-git