Skip to content
Snippets Groups Projects
Commit 812878e6 authored by Falguni Ghosh's avatar Falguni Ghosh
Browse files

Upload New File

parent fb647d8c
No related branches found
No related tags found
No related merge requests found
class Sgd:
learning_rate = None
weight_tensor_updated = None
def __init__(self, learning_rate):
self.learning_rate = learning_rate
def calculate_update(self, weight_tensor, gradient_tensor):
self.weight_tensor_updated = weight_tensor - self.learning_rate * gradient_tensor
return self.weight_tensor_updated
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment