Unverified Commit 23d09057 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Black auto fix. (#4642)



* [Misc] Black auto fix.

* sort
Co-authored-by: default avatarSteve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
parent a9f2acf3
from .gnn import GraphSage, GraphSageLayer, DiffPoolBatchedGraphLayer from .gnn import DiffPoolBatchedGraphLayer, GraphSage, GraphSageLayer
\ No newline at end of file
...@@ -14,8 +14,9 @@ class Bundler(nn.Module): ...@@ -14,8 +14,9 @@ class Bundler(nn.Module):
self.linear = nn.Linear(in_feats * 2, out_feats, bias) self.linear = nn.Linear(in_feats * 2, out_feats, bias)
self.activation = activation self.activation = activation
nn.init.xavier_uniform_(self.linear.weight, nn.init.xavier_uniform_(
gain=nn.init.calculate_gain('relu')) self.linear.weight, gain=nn.init.calculate_gain("relu")
)
def concat(self, h, aggre_result): def concat(self, h, aggre_result):
bundle = torch.cat((h, aggre_result), 1) bundle = torch.cat((h, aggre_result), 1)
...@@ -23,8 +24,8 @@ class Bundler(nn.Module): ...@@ -23,8 +24,8 @@ class Bundler(nn.Module):
return bundle return bundle
def forward(self, node): def forward(self, node):
h = node.data['h'] h = node.data["h"]
c = node.data['c'] c = node.data["c"]
bundle = self.concat(h, c) bundle = self.concat(h, c)
bundle = F.normalize(bundle, p=2, dim=1) bundle = F.normalize(bundle, p=2, dim=1)
if self.activation: if self.activation:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import torch import torch
def swish(x): def swish(x):
""" """
Swish activation function, Swish activation function,
......
This diff is collapsed.
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