From 330702663a8955e80d84c92b50cfde4d44f10622 Mon Sep 17 00:00:00 2001 From: Maneel Reddy Karri Date: Mon, 4 Sep 2023 21:06:34 -0700 Subject: [PATCH] Import fix --- test/nn/cell/test_can.py | 13 ++++--------- test/nn/cell/test_ccxn.py | 14 ++++++-------- test/nn/cell/test_cwn.py | 13 +++++-------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/test/nn/cell/test_can.py b/test/nn/cell/test_can.py index 8a121413..d66dcdc9 100644 --- a/test/nn/cell/test_can.py +++ b/test/nn/cell/test_can.py @@ -1,11 +1,7 @@ -"""Unit tests for CAN""" - -from toponetx.classes.cell_complex import CellComplex -from torch_geometric.utils.convert import to_networkx -import torch +"""Unit tests for CAN.""" import networkx as nx -import torch.nn.functional as F -from topomodelx.nn.cell.can_layer import CANLayer, PoolLayer, LiftLayer +import torch + from topomodelx.nn.cell.can import CAN device = torch.device("cuda" if torch.cuda.is_available() else "cpu") @@ -16,7 +12,6 @@ class TestCAN: def test_forward(self): """Test the forward method of CAN.""" - nodes = 17 edges = 38 node_features = 7 @@ -60,7 +55,7 @@ def test_forward(self): ) def test_forward_without_attn(self): - """Test the forward method of CAN.(without attn)""" + """Test the forward method of CAN.(without attn).""" nodes = 17 edges = 38 node_features = 7 diff --git a/test/nn/cell/test_ccxn.py b/test/nn/cell/test_ccxn.py index 60314726..b794dbc1 100644 --- a/test/nn/cell/test_ccxn.py +++ b/test/nn/cell/test_ccxn.py @@ -1,13 +1,12 @@ -"""Unit tests for CCXN""" +"""Unit tests for CCXN.""" + +import itertools +import random -from toponetx.classes.cell_complex import CellComplex import torch -import networkx as nx -import torch.nn.functional as F -from topomodelx.nn.cell.ccxn_layer import CCXNLayer + from topomodelx.nn.cell.ccxn import CCXN -import random -import itertools +from toponetx.classes.cell_complex import CellComplex device = torch.device("cuda" if torch.cuda.is_available() else "cpu") @@ -17,7 +16,6 @@ class TestCCXN: def test_forward(self): """Test the forward method of CCXN.""" - faces = 14 node_creation = 17 nodes_per_face = 3 diff --git a/test/nn/cell/test_cwn.py b/test/nn/cell/test_cwn.py index 3b89d204..e839d3e4 100644 --- a/test/nn/cell/test_cwn.py +++ b/test/nn/cell/test_cwn.py @@ -1,13 +1,11 @@ -"""Unit tests for CWN""" +"""Unit tests for CWN.""" +import itertools +import random -from toponetx.classes.cell_complex import CellComplex import torch -import networkx as nx -import torch.nn.functional as F -from topomodelx.nn.cell.cwn_layer import CWNLayer + from topomodelx.nn.cell.cwn import CWN -import random -import itertools +from toponetx.classes.cell_complex import CellComplex device = torch.device("cuda" if torch.cuda.is_available() else "cpu") @@ -17,7 +15,6 @@ class TestCWN: def test_forward(self): """Test the forward method of CWN.""" - faces = 14 node_creation = 17 nodes_per_face = 3