Unverified Commit b7042a14 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[BugFix] fix unexpected exception when agg_type is GCN and bias disabled (#5127)



* [BugFix] fix unexpected exception when agg_type is GCN and bias is disabled

* Update sageconv.py
Co-authored-by: default avatarQuan (Andy) Gan <coin2028@hotmail.com>
parent 5c6af804
...@@ -129,6 +129,8 @@ class SAGEConv(nn.Module): ...@@ -129,6 +129,8 @@ class SAGEConv(nn.Module):
self.fc_self = nn.Linear(self._in_dst_feats, out_feats, bias=bias) self.fc_self = nn.Linear(self._in_dst_feats, out_feats, bias=bias)
elif bias: elif bias:
self.bias = nn.parameter.Parameter(torch.zeros(self._out_feats)) self.bias = nn.parameter.Parameter(torch.zeros(self._out_feats))
else:
self.register_buffer("bias", None)
self.reset_parameters() self.reset_parameters()
......
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