Unverified Commit ba8dc958 authored by Hui Liu's avatar Hui Liu Committed by GitHub
Browse files

[Minor] Fix bias in if to remove ambiguity (#3259)

parent e221910e
...@@ -73,7 +73,7 @@ class UnquantizedLinearMethod(LinearMethodBase): ...@@ -73,7 +73,7 @@ class UnquantizedLinearMethod(LinearMethodBase):
bias: Optional[torch.Tensor] = None) -> torch.Tensor: bias: Optional[torch.Tensor] = None) -> torch.Tensor:
weight = weights["weight"] weight = weights["weight"]
if self.separate_bias_add: if self.separate_bias_add:
if bias: if bias is not None:
return F.linear(x, weight) + bias return F.linear(x, weight) + bias
return F.linear(x, weight) return F.linear(x, weight)
return F.linear(x, weight, bias) return F.linear(x, weight, bias)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment