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

ValueError: setting an array element with a sequence. #5

Open
qiuliwang opened this issue May 31, 2018 · 9 comments
Open

ValueError: setting an array element with a sequence. #5

qiuliwang opened this issue May 31, 2018 · 9 comments

Comments

@qiuliwang
Copy link

这是个很棒的项目,处理数据的部分没有太大问题就跑出来了,但是在训练过程中出现了一下问题:
Traceback (most recent call last):
File "main.py", line 16, in
model.inference(normalazation_output_path,test_path,0,True)
File "/home/wangqiuli/Documents/luna16_multi_size_3dcnn/model.py", line 145, in inference
_,summary = sess.run([train_step, merged],feed_dict =feed_dict)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1104, in _run
np_val = np.asarray(subfeed_val, dtype=subfeed_dtype)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
请问作者能否帮忙解答一下

@YunhengWu-IB
Copy link

我也遇到了这个问题,作者能否帮忙解答一下呢?

@shartoo
Copy link
Owner

shartoo commented Jun 26, 2018

可否检查下数据呢? 我这边没有出现这个问题。这个错误的意思是 赋值有问题

@zp678
Copy link

zp678 commented Jul 20, 2018

我也遇到同样的问题,请问大家解决了没有,可否帮忙解答一下?万分感谢

@zp678
Copy link

zp678 commented Jul 20, 2018

@shartoo ,请问作者,测试数据和训练数据的维度是否是一样的,都是4维?

@qiuliwang
Copy link
Author

@zp678 我个人认为是因为在测试某个分支的时候,不应当把三个尺度的数据都传回去测试。

@zp678
Copy link

zp678 commented Jul 31, 2018 via email

@Johnhave
Copy link

请问大家这个问题解决了吗?

@qiuliwang
Copy link
Author

请问大家这个问题解决了吗?

测试单个尺度就行了

@Johnhave
Copy link

Traceback (most recent call last):
File "main.py", line 16, in
model.inference(normalazation_output_path,test_path,0,True)
File "E:\jh\LUNA16\luna16_multi_size_3dcnn-master\model.py", line 133, in inference
acc_test,loss = sess.run([accruacy,net_loss],feed_dict=test_dict)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 877, in run
run_metadata_ptr)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1069, in _run
np_val = np.asarray(subfeed_val, dtype=subfeed_dtype)
File "D:\Program Files\Anaconda3\lib\site-packages\numpy\core\numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.

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

5 participants