Update modeling_super_linear.py
Browse files- modeling_super_linear.py +3 -1
modeling_super_linear.py
CHANGED
|
@@ -261,6 +261,7 @@ class RLinear(nn.Module):
|
|
| 261 |
"-------------------------------------------------------------------------------------------------------------------"
|
| 262 |
class SparseNoisyMoE(nn.Module):
|
| 263 |
def __init__(self, configs, experts=None):
|
|
|
|
| 264 |
super(SparseNoisyMoE, self).__init__()
|
| 265 |
input_dim = configs.seq_len
|
| 266 |
self.lookback = configs.seq_len
|
|
@@ -429,7 +430,8 @@ class SparseNoisyMoE(nn.Module):
|
|
| 429 |
verticalalignment='top', bbox=props)
|
| 430 |
|
| 431 |
plt.tight_layout()
|
| 432 |
-
plt.savefig(
|
|
|
|
| 433 |
plt.close()
|
| 434 |
print(expert_probs.shape)
|
| 435 |
|
|
|
|
| 261 |
"-------------------------------------------------------------------------------------------------------------------"
|
| 262 |
class SparseNoisyMoE(nn.Module):
|
| 263 |
def __init__(self, configs, experts=None):
|
| 264 |
+
self.i = 0
|
| 265 |
super(SparseNoisyMoE, self).__init__()
|
| 266 |
input_dim = configs.seq_len
|
| 267 |
self.lookback = configs.seq_len
|
|
|
|
| 430 |
verticalalignment='top', bbox=props)
|
| 431 |
|
| 432 |
plt.tight_layout()
|
| 433 |
+
plt.savefig(F"expert_probabilities_{self.i}.png", bbox_inches='tight')
|
| 434 |
+
self.i+=1
|
| 435 |
plt.close()
|
| 436 |
print(expert_probs.shape)
|
| 437 |
|