experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issue with warmup_batches

speeding-motor opened this issue · comments

in frontend.py
def custom_loss:
true_box_xy, true_box_wh, coord_mask = tf.cond(tf.less(seen, self.warmup_batches+1), lambda: [true_box_xy + (0.5 + cell_grid) * no_boxes_mask, true_box_wh + tf.ones_like(true_box_wh) * \ np.reshape(self.anchors, [1, 1, 1, self.nb_box, 2]) * \ no_boxes_mask, tf.ones_like(coord_mask)], lambda: [true_box_xy, true_box_wh, coord_mask])

why here need to do this , why not use true_box_wh = true_box_wh when seen < warmup_batches,

when I not use warmup_batches, the nan error occurred when training(error occured in tf.exp(pred_wh)),

can you please help me ,Thank you very much