fix mHC pre_block bmm dtype mismatch: A is FP32, X is BF16
This commit is contained in:
@@ -157,7 +157,7 @@ class mHCBlock:
|
||||
A = torch.sigmoid(pre_t) + HC_EPS
|
||||
C = 2.0 * torch.sigmoid(post_t)
|
||||
B = sinkhorn_knopp(comb_t.reshape(T, n, n), t_max=self.t_max)
|
||||
x_in = torch.bmm(A.unsqueeze(1), X).squeeze(1).bfloat16()
|
||||
x_in = torch.bmm(A.unsqueeze(1), X.float()).squeeze(1).bfloat16()
|
||||
return x_in, {'B': B, 'C': C}
|
||||
|
||||
def post_block(self, X, F_out, ctx):
|
||||
|
||||
Reference in New Issue
Block a user