Update modeling_super_linear.py
Browse files- modeling_super_linear.py +1 -0
modeling_super_linear.py
CHANGED
|
@@ -355,6 +355,7 @@ class SparseNoisyMoE(nn.Module):
|
|
| 355 |
|
| 356 |
load_balancing_loss = self.calculate_load_balancing_loss(self.gate_outputs, batch_size)
|
| 357 |
|
|
|
|
| 358 |
expert_probs = expert_probs[1,:]
|
| 359 |
# Plot the expert probabilities
|
| 360 |
import matplotlib.pyplot as plt
|
|
|
|
| 355 |
|
| 356 |
load_balancing_loss = self.calculate_load_balancing_loss(self.gate_outputs, batch_size)
|
| 357 |
|
| 358 |
+
expert_probs = F.softmax(self.gate_outputs, dim=1)
|
| 359 |
expert_probs = expert_probs[1,:]
|
| 360 |
# Plot the expert probabilities
|
| 361 |
import matplotlib.pyplot as plt
|