Adaptive Friction in Deep Learning: Enhancing Optimizers with Sigmoid and Tanh Function