Multi-Human-Parsing
Multi-Human-Parsing copied to clipboard
train_step1 all pixels are classified as backgound(black)
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.
Yes, I have the same issue
Why you change the loss part? I can run train_step1.py and has the same issue with yours.