Mx.symbol.smooth_l1() funcation has a parameter ("grad_scale"), I want to set a different value for different batch, how to do that?

#1

mx.symbol.smooth_l1() funcation has a parameter (“grad_scale”), I want to set a different value for different batch, how to do that?

Any advice will be appreciated, thanks

#2

Hi @hdjsjyl,

Could you explain what you mean by ‘different value for different batch’? If you’re changing this parameter based on the data in the batch, you could have multiple operators (for each parameter) and choose between them using mxnet.ndarray.contrib.cond.