web-traffic-forecasting icon indicating copy to clipboard operation
web-traffic-forecasting copied to clipboard

sequence smape loss function

Open SmokeShine opened this issue 5 years ago • 1 comments

zero_loss = 2.0*tf.ones_like(smape) nonzero_loss = smape smape = tf.where(tf.logical_or(tf.equal(y, 0.0), tf.equal(y_hat, 0.0)), zero_loss, nonzero_loss)

There is 'or' condition. What if y !=0.0 and y_hat=0.0. Sequence smape will still give value of zero loss.

It should be 'and' condition.

SmokeShine avatar Apr 17 '19 07:04 SmokeShine

I think he mean that when y or y_hat equal 0, use the loss(nonzero_loss) is not reasonable,so he give a comparable big loss 1 .

songquanwang avatar Apr 19 '19 08:04 songquanwang