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

Some TensorFlow implementation problems. #7

Closed
zengpeng629 opened this issue Aug 14, 2018 · 1 comment
Closed

Some TensorFlow implementation problems. #7

zengpeng629 opened this issue Aug 14, 2018 · 1 comment

Comments

@zengpeng629
Copy link

hi, Maxim

you present a very interesting and solid work! but I met some implementation error while using your lovasz loss in my deeplab v3+. My initial loss is tf.losses.softmax_cross_entropy, and I prepared:

onehot_labels: [batch_size, num_classes] target one-hot-encoded labels.
logits: [batch_size, num_classes] logits outputs of the network .

as its input, but it just didn't fit in your loss, could you please give some advice about how to transfer original params into your params like probas, labels? Thank you!

@bermanmaxim
Copy link
Owner

Hello,
Indeed, the loss does not expect a one-hot label encoding, but simply the integer labels that are expected. See this line for the expected inputs.
You may change your data loader to provide integer labelled images, or convert one-hot to integer with e.g. argmax, altough that would be some waste of computation.

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