From 5814d359aae98dd0e8f89254efd9ece9fb40f5e6 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Mon, 13 Jan 2020 19:43:11 +0100 Subject: __repr__ for SCNN. --- scnn/scnn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scnn/scnn.py b/scnn/scnn.py index f46cc56..f825cb9 100644 --- a/scnn/scnn.py +++ b/scnn/scnn.py @@ -24,6 +24,7 @@ class SimplicialConvolution(nn.Module): self.C_out = C_out self.K = K self.enable_bias = enable_bias + self.variance = variance self.theta = nn.parameter.Parameter(variance*torch.randn((self.C_out, self.C_in, self.K))) if self.enable_bias: @@ -46,6 +47,9 @@ class SimplicialConvolution(nn.Module): return y + self.bias + def __repr__(self): + return "SimplicialConvolution(K=%d, C_in=%d, C_out=%d, enable_bias=%s, variance=%f)" %(self.K, self.C_in, self.C_out, self.enable_bias, self.variance) + # This class does not yet implement the # Laplacian-power-pre/post-composed with the coboundary. It can be # simulated by just adding more layers anyway, so keeping it simple -- cgit v1.2.3