Update modeling_super_linear.py
Browse files456 unmodified lines4574584594604614624634644652 unmodified lines4684694704714724734 unmodified lines478479480481482483484485486487488489490456 unmodified linesV = 1x = x.reshape(B * V, L)print("RAZ")print(x.shape)expert_probs = Noneif get_prob:2 unmodified linesout, self.moe_loss = self.moe(x)if self.auto_regressive and self.max_horizon < self.inf_pred_len:outputs = [out]ar_x = torch.cat([x, out], dim=1)[:, -self.seq_len:]for i in range(0, self.inf_pred_len, self.max_horizon):4 unmodified linesif len(x_enc.shape) > 2:out = out.reshape(B, V, out.shape[-1])print(F"out2 :{out.shape}")result = out.permute(0, 2, 1)else:print(F"out1 :{out.shape}")result = outif get_prob:expert_probs = expert_probs.reshape(B, V, expert_probs.shape[-1])return result, expert_probs456 unmodified lines4574584594604614622 unmodified lines4654664674684694704714 unmodified lines476477478479480481482483484485456 unmodified linesV = 1x = x.reshape(B * V, L)expert_probs = Noneif get_prob:2 unmodified linesout, self.moe_loss = self.moe(x)if self.auto_regressive and self.max_horizon < self.inf_pred_len:print("bitch")outputs = [out]ar_x = torch.cat([x, out], dim=1)[:, -self.seq_len:]for i in range(0, self.inf_pred_len, self.max_horizon):4 unmodified linesif len(x_enc.shape) > 2:out = out.reshape(B, V, out.shape[-1])result = out.permute(0, 2, 1)else:result = outif get_prob:expert_probs = expert_probs.reshape(B, V, expert_probs.shape[-1])return result, expert_probs
modeling_super_linear.py+1-6