from .Optimizers import Optimizer
class SGD(Optimizer):
    def __init__ (self, lr=0.01):
      super().__init__(lr);  
      self.lr = lr
    # def update(self, params, grads):
    #   for key in params.keys():
    #     params[key] -= self.lr * grads[key]
        
        
    def update_parameters(self, params, grads):
          for key in params.keys():
            params[key] -= self.lr * grads[key]
            
    def update(self, params, grads):
   
         for i in range(len(params)):
           params[i] -= self.learning_rate * grads[i]