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

running data_prepare.py occured ValueError #3

Open
HbueSky opened this issue May 13, 2018 · 8 comments
Open

running data_prepare.py occured ValueError #3

HbueSky opened this issue May 13, 2018 · 8 comments

Comments

@HbueSky
Copy link

HbueSky commented May 13, 2018

process images 1.3.6.1.4.1.14519.5.2.1.6279.6001.108197895896446896160048741492.mhd error...
(<type 'exceptions.Exception'>, ':', ValueError('could not broadcast input array from shape (40,40,25) into shape (40,40,26)',))
Traceback (most recent call last):
File "/home/.../luna16_multi_size_3dcnn-master/data_prepare.py", line 145, in extract_fake_cubic_from_mhd
int(v_center[2] - 13):int(v_center[2] + 13)]
ValueError: could not broadcast input array from shape (40,40,25) into shape (40,40,26)
Traceback (most recent call last):
File "/home/.../luna16_multi_size_3dcnn-master/data_prepare.py", line 145, in extract_fake_cubic_from_mhd
int(v_center[2] - 13):int(v_center[2] + 13)]
ValueError: could not broadcast input array from shape (40,40,0) into shape (40,40,26)
process images 1.3.6.1.4.1.14519.5.2.1.6279.6001.108197895896446896160048741492.mhd error...
(<type 'exceptions.Exception'>, ':', ValueError('could not broadcast input array from shape (40,40,0) into shape (40,40,26)',))
Traceback (most recent call last):
File "/home/.../luna16_multi_size_3dcnn-master/data_prepare.py", line 145, in extract_fake_cubic_from_mhd
int(v_center[2] - 13):int(v_center[2] + 13)]
ValueError: could not broadcast input array from shape (40,40,22) into shape (40,40,26)

@a56256324
Copy link

Have you solved the problem?I have a similar problem, will it affect the following procedure?
Thank you~

@shartoo
Copy link
Owner

shartoo commented May 21, 2018

Sorry,it's my problem. The index is out of range,some modify should be done in the method to check range before slice.

@cherry-ball
Copy link

I have the same problem, and I wanna know how to solve it. Really looking forward to your answer. Thanks a lot.

@qiuliwang
Copy link

你好,请问出现这个错误的话会影响后面的操作吗?我也遇到了这个问题。

@shartoo
Copy link
Owner

shartoo commented May 28, 2018

@HbueSky @wangqiuli0102 @cherry-ball @a56256324 This is not a fatal error,it's fine to skip this error. It does not effect any later operation.

@guyucowboy
Copy link

shartoo,你好,如果修改的话,是不是先判断一下,无法组成slice的数据(导致 越界),都舍弃掉?多谢!

@qishuaizheng
Copy link

您好,为什么第一个尺寸的模型可以跑通,其他两个尺寸的模型跑不通呀?错误如下:“InvalidArgumentError (see above for traceback): logits and labels must be broadcastable: logits_size=[128,2] labels_size=[32,2] [[node softmax_cross_entropy_with_logits_sg (defined at H:/自己的软件/代码文献/1/luna16_multi_size_3dcnn-master/new_model.py:267)。” 万分感谢,谢谢。 #

@qiuliwang
Copy link

logits_size=[128,2] labels_size=[32,2]这个地方,label和你模型预测的维度不一致

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

7 participants