updated calls to use loc &scale (#643)

This commit is contained in:
LeonEricsson
2024-02-08 18:01:59 +01:00
committed by GitHub
parent 1b97b2958b
commit 7dccd42133
2 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ class Embedding(Module):
def __init__(self, num_embeddings: int, dims: int):
super().__init__()
scale = math.sqrt(1 / dims)
self.weight = mx.random.normal((num_embeddings, dims)) * scale
self.weight = mx.random.normal(shape=(num_embeddings, dims), scale=scale)
def _extra_repr(self):
return f"{self.weight.shape[0]}, {self.weight.shape[1]}"