Yuchan commited on
Commit
e5497f3
·
verified ·
1 Parent(s): 1f4c0fc

Update AlphaS2S.py

Browse files
Files changed (1) hide show
  1. AlphaS2S.py +1 -5
AlphaS2S.py CHANGED
@@ -222,7 +222,7 @@ class LoU(layers.Layer):
222
  self.alpha_linear = layers.Dense(1, activation='sigmoid', dtype='float32')
223
 
224
  self.cross = CrossBlock()
225
- self.glu = SwiGLU(d_model, 320)
226
 
227
  def _ema_over_time(self, score, alpha_dynamic):
228
  seq = tf.transpose(score, perm=[1, 0, 2])
@@ -253,10 +253,6 @@ class LoU(layers.Layer):
253
  q = self.Q(x_f32)
254
  k = self.K(x_f32)
255
  V = self.V(x_f32)
256
-
257
- # Unidirectional Masking: 미래 정보를 막는 Look-ahead Mask를 수동으로 적용해야 하지만,
258
- # 기존 LoU 구현은 Self-Attention이 아니므로 Skip.
259
-
260
  g_q = (tf.nn.tanh(q) + 1.0) / 2.0
261
  g_k = (tf.nn.tanh(k) + 1.0) / 2.0
262
  score = g_q * g_k
 
222
  self.alpha_linear = layers.Dense(1, activation='sigmoid', dtype='float32')
223
 
224
  self.cross = CrossBlock()
225
+ self.glu = SwiGLU(d_model, d_model)
226
 
227
  def _ema_over_time(self, score, alpha_dynamic):
228
  seq = tf.transpose(score, perm=[1, 0, 2])
 
253
  q = self.Q(x_f32)
254
  k = self.K(x_f32)
255
  V = self.V(x_f32)
 
 
 
 
256
  g_q = (tf.nn.tanh(q) + 1.0) / 2.0
257
  g_k = (tf.nn.tanh(k) + 1.0) / 2.0
258
  score = g_q * g_k