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

two questions about the code #11

Open
icoz69 opened this issue Sep 19, 2017 · 1 comment
Open

two questions about the code #11

icoz69 opened this issue Sep 19, 2017 · 1 comment

Comments

@icoz69
Copy link

icoz69 commented Sep 19, 2017

thanks for the code. its a cool implementation.
i have two questions about the code
1.
the first is about the 'computer_error' functions.
for exmale,the size of fake and real are NHWC, after expand_dims(tf.reduce_mean(tf.abs(fake-real),reduction_indices=[3]),-1) ,the size is NHW1
then the result label returns NHW20,and the final result of this function is N*20,right?

2.the second question is label:np.concatenate((label_images[ind],np.expand_dims(1-np.sum(label_images[ind],axis=3),axis=3)),axis=3)
why the 19-dimention label maps are concatenated with np.expand_dims(1-np.sum(label_images[ind],axis=3),axis=3)).
i guess the later parts refers to some transformation error between RGB label images and 19-dimention labels.

thanks

@CQFIO
Copy link
Owner

CQFIO commented Sep 19, 2017

  1. That's correct.

  2. I expand a 19D label map to 20D. The expanded extra dimension is for "void" regions. This ensures that each pixel has a one-hot-vector at each pixel. This prevents the network performing convolutions with a tensor with all zeros.

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