From dbbb6035d4afb3daefd96a8452428bb2d2949904 Mon Sep 17 00:00:00 2001 From: "Jayesh K. Gupta" Date: Wed, 30 Aug 2023 11:58:25 -0700 Subject: [PATCH] move and restructure cliffordlayers based models --- cliffordlayers/models/{ => basic}/custom_kernels.py | 0 cliffordlayers/models/{ => basic}/custom_layers.py | 2 +- cliffordlayers/models/{models_3d.py => basic/threed.py} | 2 +- cliffordlayers/models/{models_2d.py => basic/twod.py} | 2 +- cliffordlayers/models/{gca_models_2d.py => gca/twod.py} | 0 tests/test_CliffordFluidNet2d.py | 2 +- tests/test_CliffordMaxwellNet3d.py | 2 +- tests/test_GCAFluidNet2d.py | 2 +- tests/test_clifford_convolution_custom.py | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename cliffordlayers/models/{ => basic}/custom_kernels.py (100%) rename cliffordlayers/models/{ => basic}/custom_layers.py (98%) rename cliffordlayers/models/{models_3d.py => basic/threed.py} (98%) rename cliffordlayers/models/{models_2d.py => basic/twod.py} (98%) rename cliffordlayers/models/{gca_models_2d.py => gca/twod.py} (100%) diff --git a/cliffordlayers/models/custom_kernels.py b/cliffordlayers/models/basic/custom_kernels.py similarity index 100% rename from cliffordlayers/models/custom_kernels.py rename to cliffordlayers/models/basic/custom_kernels.py diff --git a/cliffordlayers/models/custom_layers.py b/cliffordlayers/models/basic/custom_layers.py similarity index 98% rename from cliffordlayers/models/custom_layers.py rename to cliffordlayers/models/basic/custom_layers.py index 19c2b93..ec33936 100644 --- a/cliffordlayers/models/custom_layers.py +++ b/cliffordlayers/models/basic/custom_layers.py @@ -12,7 +12,7 @@ CliffordConv2d, CliffordConv3d, ) -from cliffordlayers.models.custom_kernels import ( +from cliffordlayers.models.basic.custom_kernels import ( get_2d_scalar_vector_encoding_kernel, get_2d_scalar_vector_decoding_kernel, get_2d_rotation_scalar_vector_encoding_kernel, diff --git a/cliffordlayers/models/models_3d.py b/cliffordlayers/models/basic/threed.py similarity index 98% rename from cliffordlayers/models/models_3d.py rename to cliffordlayers/models/basic/threed.py index 4ebe6a1..ecfbfec 100644 --- a/cliffordlayers/models/models_3d.py +++ b/cliffordlayers/models/basic/threed.py @@ -14,7 +14,7 @@ from cliffordlayers.nn.modules.cliffordconv import CliffordConv3d from cliffordlayers.nn.modules.cliffordfourier import CliffordSpectralConv3d from cliffordlayers.nn.modules.groupnorm import CliffordGroupNorm3d -from cliffordlayers.models.custom_layers import CliffordConv3dMaxwellEncoder, CliffordConv3dMaxwellDecoder +from cliffordlayers.models.basic.custom_layers import CliffordConv3dMaxwellEncoder, CliffordConv3dMaxwellDecoder class CliffordFourierBasicBlock3d(nn.Module): diff --git a/cliffordlayers/models/models_2d.py b/cliffordlayers/models/basic/twod.py similarity index 98% rename from cliffordlayers/models/models_2d.py rename to cliffordlayers/models/basic/twod.py index 170c8f6..5cc1e62 100644 --- a/cliffordlayers/models/models_2d.py +++ b/cliffordlayers/models/basic/twod.py @@ -14,7 +14,7 @@ from cliffordlayers.nn.modules.cliffordconv import CliffordConv2d from cliffordlayers.nn.modules.cliffordfourier import CliffordSpectralConv2d from cliffordlayers.nn.modules.groupnorm import CliffordGroupNorm2d -from cliffordlayers.models.custom_layers import CliffordConv2dScalarVectorEncoder, CliffordConv2dScalarVectorDecoder +from cliffordlayers.models.basic.custom_layers import CliffordConv2dScalarVectorEncoder, CliffordConv2dScalarVectorDecoder class CliffordBasicBlock2d(nn.Module): diff --git a/cliffordlayers/models/gca_models_2d.py b/cliffordlayers/models/gca/twod.py similarity index 100% rename from cliffordlayers/models/gca_models_2d.py rename to cliffordlayers/models/gca/twod.py diff --git a/tests/test_CliffordFluidNet2d.py b/tests/test_CliffordFluidNet2d.py index 274d14d..e7345c2 100644 --- a/tests/test_CliffordFluidNet2d.py +++ b/tests/test_CliffordFluidNet2d.py @@ -4,7 +4,7 @@ import torch import torch.nn.functional as F from cliffordlayers.models.utils import partialclass -from cliffordlayers.models.models_2d import ( +from cliffordlayers.models.basic.twod import ( CliffordFluidNet2d, CliffordBasicBlock2d, CliffordFourierBasicBlock2d, diff --git a/tests/test_CliffordMaxwellNet3d.py b/tests/test_CliffordMaxwellNet3d.py index 8da4291..005f51b 100644 --- a/tests/test_CliffordMaxwellNet3d.py +++ b/tests/test_CliffordMaxwellNet3d.py @@ -3,7 +3,7 @@ import torch import torch.nn.functional as F -from cliffordlayers.models.models_3d import ( +from cliffordlayers.models.basic.threed import ( CliffordMaxwellNet3d, CliffordFourierBasicBlock3d, ) diff --git a/tests/test_GCAFluidNet2d.py b/tests/test_GCAFluidNet2d.py index d6a371f..e47c25c 100644 --- a/tests/test_GCAFluidNet2d.py +++ b/tests/test_GCAFluidNet2d.py @@ -2,7 +2,7 @@ # Licensed under the MIT license. import torch -from cliffordlayers.models.gca_models_2d import CliffordG3ResNet2d, CliffordG3UNet2d +from cliffordlayers.models.gca.twod import CliffordG3ResNet2d, CliffordG3UNet2d def test_gca_resnet(): diff --git a/tests/test_clifford_convolution_custom.py b/tests/test_clifford_convolution_custom.py index ea7026c..a589cbb 100644 --- a/tests/test_clifford_convolution_custom.py +++ b/tests/test_clifford_convolution_custom.py @@ -2,7 +2,7 @@ # Licensed under the MIT license. import torch -from cliffordlayers.models.custom_layers import ( +from cliffordlayers.models.basic.custom_layers import ( CliffordConv2dScalarVectorEncoder, CliffordConv2dScalarVectorDecoder, CliffordConv3dMaxwellEncoder,