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 #17

Open
kp-1 opened this issue Sep 28, 2019 · 10 comments
Open

ValueError #17

kp-1 opened this issue Sep 28, 2019 · 10 comments

Comments

@kp-1
Copy link

kp-1 commented Sep 28, 2019

This is my error:

ValueError: Cannot feed value of shape (1, 512, 512, 6) for Tensor 'queue_input:0', which has shape '(?, 512, 512, 2)'

This is the same mistake that I made when I used imjoy to predict pictures, I used.tif images

@kp-1 kp-1 closed this as completed Sep 28, 2019
@kp-1 kp-1 reopened this Sep 28, 2019
@kp-1
Copy link
Author

kp-1 commented Sep 28, 2019

This is my error:

ValueError: Cannot feed value of shape (1, 512, 512, 6) for Tensor 'queue_input:0', which has shape '(?, 512, 512, 2)'

This is the same mistake that I made when I used imjoy to predict pictures, I used.tif images

@oeway
Copy link
Contributor

oeway commented Sep 28, 2019

Are you feeding images with 6 input channels? Could you make sure you set the correct input channel number: after these lines, https://github.com/imodpasteur/ANNA-PALM/blob/master/run_generic.py#L29-L32 if you do print(opt.input_nc) you should get 6 to match your input channel numbers.

@kp-1
Copy link
Author

kp-1 commented Sep 28, 2019

So what should I do ?Set 'input_nc default=6' in ANNA-PALM/AnetLib/base_options.py ?

@oeway
Copy link
Contributor

oeway commented Sep 28, 2019

You don't need to touch AnetLib files, set opt.input_nc = 6 in your train_xxx.py should work.
May I ask what type of data are you processing?

@kp-1
Copy link
Author

kp-1 commented Sep 28, 2019

.tif

@kp-1
Copy link
Author

kp-1 commented Sep 28, 2019

I didn't add any code or.py files at all, I just wanted to test my own image with the original code and see what it looked like.So what do I do?Do I still need to change it in the AnetLib file?

@kp-1
Copy link
Author

kp-1 commented Sep 28, 2019

I am sorry to trouble you. I am a junior undergraduate student. After seeing the paper, I felt very interesting and wanted to use my own picture to see the effect,So I hope you can help me, thank you very much!

@oeway
Copy link
Contributor

oeway commented Sep 28, 2019

Sorry, I still don't get what are you trying to do. If you want to get help from others you need to at least describe your problem thoroughly. Github repos are often watched by many people, if possible, please try to avoid spamming with incomplete messages.

Please try complete with the following information:

  1. describe your data (.tif is not enough), how is the image generated, how many channels, what's the bit-depth, size etc. How did you organize your data folders.
  2. what are you trying to achieve and what do you expect from ANNA-PALM models.
  3. what have you tried, what's your OS, python version, which file are you running. What's the error message.

@oeway
Copy link
Contributor

oeway commented Sep 30, 2019

Hi, it may be not directly related to this, but I just made some changes to the file named run_generic.py, there was an error with the option name opt.output_nc, 7ebf65a

@kp-1
Copy link
Author

kp-1 commented Sep 30, 2019

First, the information about my image is as follows: image

Then,as for the problem of image prediction, in the past two days, I made some attempts to change the image to grayscale (the number of channels is 1), so there is no error report and we can predict it, but what we need is color image, So, I have to retrain the model, but tonight, I will put the parameter in run_img.py:
Opt. Input_nc = 6
Opt. Output_nc = 6
It is strange to still report the same errors as the predictions.
My machine configuration is ubuntu, 1080 ti, python3.6, tensorflow - the gpu

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