parent
0aef35a965
commit
4af88a67b9
1 changed files with 1 additions and 3 deletions
|
|
@ -665,7 +665,5 @@ class BF16Linear(nn.Linear):
|
||||||
if self.bias is not None and self.bias.dtype != x.dtype:
|
if self.bias is not None and self.bias.dtype != x.dtype:
|
||||||
self.bias.data = self.bias.data.to(x.dtype)
|
self.bias.data = self.bias.data.to(x.dtype)
|
||||||
|
|
||||||
result = F.linear(x, self.weight)
|
result = F.linear(x, self.weight, self.bias)
|
||||||
if self.bias is not None:
|
|
||||||
result += self.bias
|
|
||||||
return result.to(x.dtype)
|
return result.to(x.dtype)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue