GorkemP / LUNA16_Challange

Lung nodule classification / False positives reduction track codes
https://luna16.grand-challenge.org/
23 stars 14 forks source link

error when running merged summary with feed_dict #3

Closed HunarAA closed 6 years ago

HunarAA commented 6 years ago

I am using the same dataset as you for my own project, the dataset is prepared in numpy array but when I want to run merged summary as this line in your code: summary = sess.run(merged, feed_dict={inputVolume: patch, output: result }), I get an error: Expected dimension in the range [-1, 1), but got 1 [[Node: accuracy/ArgMax_1 = ArgMax[T=DT_FLOAT, Tidx=DT_INT32, output_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_y_label_0_2, cross_entropy/cross_entropy/Sub_1/y)]] here is mine: if I used like this summ = sess.run(merged_summary, feed_dict={x_img: X, y_label: Y, keep_prob: 0.8}) or like this summ, _, c = sess.run([merged_summary, optimizer, cost], feed_dict={x_img: X, y_label: Y, keep_prob: 0.8}) I get same error. can you help me solve that, please?

GorkemP commented 6 years ago

Hi,

try reshaping the tensors like reshape(-1, 1). As I understand it requires a column vector. Tensorflow data types can change in time, it was working a year ago maybe they have changed something.

HunarAA commented 6 years ago

thank you, the problem is solved by changing the data preparation into new tensorflow input pipeline. now the data is feed into model without using placeholders.