Update modeling_super_linear.py
Browse files355 unmodified lines356357358359360361355 unmodified linesload_balancing_loss = self.calculate_load_balancing_loss(self.gate_outputs, batch_size)expert_probs = F.softmax(self.gate_outputs, dim=1)print(expert_probs.shape)if get_prob:355 unmodified lines356357358359360361362363364365366367368369370371372355 unmodified linesload_balancing_loss = self.calculate_load_balancing_loss(self.gate_outputs, batch_size)expert_probs = F.softmax(self.gate_outputs, dim=1)import matplotlib.pyplot as pltplt.figure(figsize=(10, 6))plt.bar(range(len(expert_probs)), expert_probs.detach().cpu().numpy())plt.xlabel('Expert Index')plt.ylabel('Probability')plt.title('Expert Selection Probabilities')plt.xticks(range(len(expert_probs)), [f'Expert {i}' for i in range(len(expert_probs))])plt.tight_layout()plt.savefig('expert_probabilities.png')plt.close()print(expert_probs.shape)if get_prob:
modeling_super_linear.py+11