Yuchan commited on
Commit
92f9c13
·
verified ·
1 Parent(s): a004b22

Update AlphaS2S.py

Browse files
Files changed (1) hide show
  1. AlphaS2S.py +0 -11
AlphaS2S.py CHANGED
@@ -160,17 +160,6 @@ class SwiGLU(layers.Layer):
160
  x_proj = self.proj(x)
161
  x_val, x_gate = tf.split(x_proj, 2, axis=-1)
162
  return self.out(x_val * tf.nn.silu(x_gate))
163
-
164
-
165
- class SwiGLU(layers.Layer):
166
- def __init__(self, d_model, d_ff):
167
- super().__init__()
168
- self.proj = layers.Dense(d_ff*2)
169
- self.out = layers.Dense(d_model)
170
- def call(self, x):
171
- x_proj = self.proj(x)
172
- x_val, x_gate = tf.split(x_proj, 2, axis=-1)
173
- return self.out(x_val * tf.nn.silu(x_gate))
174
 
175
  class EncoderBlock(layers.Layer):
176
  def __init__(self, d_model, num_heads, dff, dropout=0.1):
 
160
  x_proj = self.proj(x)
161
  x_val, x_gate = tf.split(x_proj, 2, axis=-1)
162
  return self.out(x_val * tf.nn.silu(x_gate))
 
 
 
 
 
 
 
 
 
 
 
163
 
164
  class EncoderBlock(layers.Layer):
165
  def __init__(self, d_model, num_heads, dff, dropout=0.1):