We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I did some small change and now the train step 1 can run but all pixels are classified as backgound(black). Anyone has this same issue?
Initially the build_loss function is def build_loss(self,seg_layer,lab_holder): lab_reform = tf.expand_dims(lab_holder,-1) lab_reform = tf.image.resize_images(seg_layer,tf.shape(lab_reform)[1:3]) lab_reform = tf.squeeze(lab_reform) seg_loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=seg_layer,labels=lab_reform))
I changed it to def build_loss(self,seg_layer,lab_holder): # lab_reform = tf.expand_dims(lab_holder, -1) # lab_reform = tf.image.resize_images(seg_layer, tf.shape(lab_reform)[1:3]) # z00445456 seg_reform = tf.image.resize_images(seg_layer, tf.shape(lab_holder)[1:3]) # z00445456 # lab_reform = tf.squeeze(lab_reform) seg_loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=seg_reform,labels=lab_holder))
and it can run without error. But the result is weird. All pixels are classified as backgound.
The text was updated successfully, but these errors were encountered:
Yes, I have the same issue
Sorry, something went wrong.
Why you change the loss part? I can run train_step1.py and has the same issue with yours.
No branches or pull requests
I did some small change and now the train step 1 can run but all pixels are classified as backgound(black).
Anyone has this same issue?
Initially the build_loss function is
def build_loss(self,seg_layer,lab_holder):
lab_reform = tf.expand_dims(lab_holder,-1)
lab_reform = tf.image.resize_images(seg_layer,tf.shape(lab_reform)[1:3])
lab_reform = tf.squeeze(lab_reform)
seg_loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=seg_layer,labels=lab_reform))
I changed it to
def build_loss(self,seg_layer,lab_holder):
# lab_reform = tf.expand_dims(lab_holder, -1)
# lab_reform = tf.image.resize_images(seg_layer, tf.shape(lab_reform)[1:3]) # z00445456
seg_reform = tf.image.resize_images(seg_layer, tf.shape(lab_holder)[1:3]) # z00445456
# lab_reform = tf.squeeze(lab_reform)
seg_loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits=seg_reform,labels=lab_holder))
and it can run without error. But the result is weird. All pixels are classified as backgound.
The text was updated successfully, but these errors were encountered: