Skip to content

Commit

Permalink
removed unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
khaled-rahman committed Sep 17, 2021
1 parent 326f825 commit f898ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def helper(data, args):
useleakyrelu = args.useleakyrelu
# define a model
if args.use_gcn:
model = GCN(ndim, nlayers, len(set(data.y.tolist())), data.x, data.edge_index, data.edge_attr, droprate, useleakyrelu==1, alpha)
model = GCN(ndim, nlayers, len(set(data.y.tolist())), data.x, data.edge_index, data.edge_attr, droprate, alpha)
else:
if args.markov_agg:
(edge_index, edge_weight) = markov_process_agg(data, eps, inflate, nlayers, normrow == 1, args.keepmax == 1, args.debug == 1)
Expand Down
3 changes: 1 addition & 2 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def inference(self):
return xs

class GCN(torch.nn.Module):
def __init__(self, ndim, nlayers, ntargets, features, edges, weights = None, droprate = 0.5, useleakyrelu = False, alpha = 0.5):
def __init__(self, ndim, nlayers, ntargets, features, edges, weights = None, droprate = 0.5, alpha = 0.5):
super(GCN, self).__init__()
self.convs = []
self.ndim = ndim
Expand All @@ -63,7 +63,6 @@ def __init__(self, ndim, nlayers, ntargets, features, edges, weights = None, dro
self.ntargets = ntargets
self.features = features
self.droprate = droprate
self.useleakyrelu = useleakyrelu
self.convs.append(GCNConv(self.features.shape[1], self.ndim, cached=True))
for l in range(self.nlayers-2):
self.convs.append(GCNConv(self.ndim, self.ndim, cached=True))
Expand Down

0 comments on commit f898ba2

Please sign in to comment.