Yuchan
commited on
Update Model.py
Browse files
Model.py
CHANGED
|
@@ -213,10 +213,11 @@ class Block(layers.Layer):
|
|
| 213 |
super().__init__()
|
| 214 |
self.lou = LoU(d_model)
|
| 215 |
self.glu = SwiGLU(d_model)
|
|
|
|
| 216 |
|
| 217 |
def call(self, x):
|
| 218 |
x = self.lou(x)
|
| 219 |
-
x = self.glu(x)
|
| 220 |
return x
|
| 221 |
|
| 222 |
class ReLM(tf.keras.Model):
|
|
|
|
| 213 |
super().__init__()
|
| 214 |
self.lou = LoU(d_model)
|
| 215 |
self.glu = SwiGLU(d_model)
|
| 216 |
+
self.norm = layers.LayerNormalization(epsilon=1e-5, dtype='float32')
|
| 217 |
|
| 218 |
def call(self, x):
|
| 219 |
x = self.lou(x)
|
| 220 |
+
x = self.norm(self.glu(x)) + x
|
| 221 |
return x
|
| 222 |
|
| 223 |
class ReLM(tf.keras.Model):
|