Hello, thanks for your reply, the parameters described in Net class get updated, but the parameters described in Custom class do not get updated, that is the threshold does not get updated. I am doing the get loss, backprop, optimize part.