Upload folder using huggingface_hub
Browse files- autoencoder_epoch_1_L1_nonorm_layer_0.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_1.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_10.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_11.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_12.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_13.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_14.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_15.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_16.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_17.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_18.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_19.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_2.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_20.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_21.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_22.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_23.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_24.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_25.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_26.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_27.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_28.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_29.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_3.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_30.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_31.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_32.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_33.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_34.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_35.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_36.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_37.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_38.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_39.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_4.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_5.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_6.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_7.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_8.pth +3 -0
- autoencoder_epoch_1_L1_nonorm_layer_9.pth +3 -0
- model.py +49 -0
autoencoder_epoch_1_L1_nonorm_layer_0.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6af45fb957741de88e5388eaf3efeb15814c014db3031964984115fa91b3f94
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_1.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95048e9d9500fb08169798193832ec9f6e1e58d07219031bbf3dce23f73c9d79
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_10.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7293f5f476e2571ae9524677d3ce573911ef494558ec4302cefdd480d819fa16
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_11.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b99a6224d8f91c548f6262d0288b2fd0dd656d9e74d5fff5103d8b02527d9c9c
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_12.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50e89e13ed93f424daea0829b17d2b06596f5066d417ab4cd785af1107a8f238
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_13.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8da5ec0a5e4efaf981c5026a4f2a685ffb10a36042de671398ea65c4a91e2e6
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_14.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e25e54463dffe99638fd79a7ed908f626ab4bb94fced3c4daa576a02bddbaaf
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_15.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d98941382c2376d5e673055dd4449a95fa9b97caedb17a2908cf3f07caf513c
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_16.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72fe8bfdb2b6586da6dfa456ed5954928c2aa16aff89a628d32e6a64ed92ca4b
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_17.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc8a6342d50b945a47548455d2743ed0e6a4d48317d839c87174c7aadb6b71d4
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_18.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3980e6b0bc6f2acc81ff664d4ee91856a461f707e7b8618b506764d7950bd66c
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_19.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93d6df7e59aeb4adf090bd735da69c76caed09927cf642ff187af869d2227ad8
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_2.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1976c0f656d9da751714d3e255724a348d0f03aed0c4ce99d94bdc23268bcdc
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_20.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:110999275e26f1e8df59fdf8f3d11454e3e0d72b944d6b0d672217c0bf652cf4
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_21.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c3679b80f452847f25cb4582965956e5f92149826a2ab10665d923fe78aac69
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_22.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c1c107fb18a63eed22bcc547ad62f8cfd6075ca86067d4909ecc015c5cf6fef
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_23.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a202d3fbdf204a866808517fb1f2c7a98da8d619a5e9958638f64040a29a4fc1
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_24.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ce677fd9b50dbe739d1afadda24b88926c9910da861ffebe941d504e53e8873
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_25.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f698bab28ba8b9ca5b38cd54f7ccc7b890696c021459dbc3ea3ecdd3de6be6fa
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_26.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24f465b47cb2adb32bfc43d4a144f3fb9994c12c5a82777d806eca73cee9b34a
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_27.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd4a222b530229c9d4e3a4e118381db3c60d8a2f67ddd152a5a7b6755fc142bd
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_28.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdec919d678afe3845bb9c3c75aee541d531c3a47ae41fa0cf8528698d8c5966
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_29.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5138440fdbcc2f6553bccc45ba56cc3e20a13f6b9570d78c7ff7cf685318a9a7
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_3.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf387153ad7e1eea2a9282d7bed7889a4c752d0f0c7e0091607ef3e0b679c30e
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_30.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f411482c01729de39618f1b6ab58af87c87689845d654f7d0eaa000ef6b7f0ff
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_31.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e56324ac97d4e4378f06fe57fe42f5c8868e574fdb211fb3f1198dce68784dc4
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_32.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03c38696b5d0ceeccd960a86e9a2bb2e16c4378a17ed7a321b80c001349c8138
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_33.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:516459775a19e0e847a8e2ed7682c01f6c394a7566aa62c05cec179caa9ee16c
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_34.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a6cfa4e7d6ef89beecec2ef58cce7e5150f80d257a43a0aa7f9c721ac4ed34c
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_35.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:078dfef394c39ecbc03cf063a14a73c12e83f049f99844d609200373818118ea
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_36.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e284b427256faf7bd408948ac4327d6f18e6ccb73b1d1cbb087f662077078f38
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_37.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f878ace2e0f40f099b2fdd8ed131d940df05fbf1fd34b84e3c62400e8f529fd9
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_38.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e150cc5ad6f6c154ec3561eed52881c19c51a862210776dcaa8059fe0731d53
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_39.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe06a4f84fa1135119fa2c4a50526a4d75fa74443467786743691dabef9ee8f4
|
| 3 |
+
size 6733198
|
autoencoder_epoch_1_L1_nonorm_layer_4.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74f6ccc7c08e274300b0464fe588d78f689b47ddc06d095ac1958f484e70d542
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_5.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c21afc14b34fc9d2eb1c72d7955750f4a9011187b9c889107a5eb97b6f2cdec2
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_6.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:777871175368803b73504cf5fdf7dacab8a74fa5201672d6c7296409e68288c9
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_7.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0e253d5b77923b28bf0639744dd8bc5407a9cc1251f5ec8ed34b035893a0e5e
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_8.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d412d3f9056c384c5077eafbf3a7cdaa003f84b3a3810616020a63d50d937437
|
| 3 |
+
size 6733153
|
autoencoder_epoch_1_L1_nonorm_layer_9.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebfc9654ce1e0255e1ba146481063f7dcdf4bfe6047723e35554babb303c5b9e
|
| 3 |
+
size 6733153
|
model.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class GroupedAutoEncoder(nn.Module):
|
| 3 |
+
def __init__(self, input_dim, hidden_dim, num_groups):
|
| 4 |
+
super(GroupedAutoEncoder, self).__init__()
|
| 5 |
+
|
| 6 |
+
self.num_groups = num_groups
|
| 7 |
+
self.group_input_dim = input_dim // num_groups
|
| 8 |
+
self.group_hidden_dim = hidden_dim // num_groups
|
| 9 |
+
|
| 10 |
+
assert input_dim % num_groups == 0, "Input dimension must be divisible by the number of groups."
|
| 11 |
+
assert hidden_dim % num_groups == 0, "Hidden dimension must be divisible by the number of groups."
|
| 12 |
+
|
| 13 |
+
# Define group-wise encoders and decoders
|
| 14 |
+
self.encoders = nn.ModuleList([
|
| 15 |
+
nn.Linear(self.group_input_dim, self.group_hidden_dim, bias=False)
|
| 16 |
+
for _ in range(num_groups)
|
| 17 |
+
])
|
| 18 |
+
'''
|
| 19 |
+
self.decoders = nn.ModuleList([
|
| 20 |
+
nn.Linear(self.group_hidden_dim, self.group_input_dim, bias=False)
|
| 21 |
+
for _ in range(num_groups)
|
| 22 |
+
])
|
| 23 |
+
'''
|
| 24 |
+
self.decoder = nn.Linear(hidden_dim, input_dim, bias=False)
|
| 25 |
+
|
| 26 |
+
self.init_weights()
|
| 27 |
+
|
| 28 |
+
def init_weights(self):
|
| 29 |
+
for encoder in self.encoders:
|
| 30 |
+
nn.init.xavier_uniform_(encoder.weight)
|
| 31 |
+
#for decoder in self.decoders:
|
| 32 |
+
# nn.init.xavier_uniform_(decoder.weight)
|
| 33 |
+
nn.init.xavier_uniform_(self.decoder.weight)
|
| 34 |
+
|
| 35 |
+
def forward(self, x):
|
| 36 |
+
# Split input into groups
|
| 37 |
+
group_inputs = torch.split(x, self.group_input_dim, dim=1)
|
| 38 |
+
|
| 39 |
+
# Apply group-wise encoding
|
| 40 |
+
encoded_groups = [encoder(group) for group, encoder in zip(group_inputs, self.encoders)]
|
| 41 |
+
|
| 42 |
+
# Apply group-wise decoding
|
| 43 |
+
#decoded_groups = [decoder(group) for group, decoder in zip(encoded_groups, self.decoders)]
|
| 44 |
+
|
| 45 |
+
reconstructed = self.decoder(torch.cat(encoded_groups,dim=1))
|
| 46 |
+
|
| 47 |
+
# Concatenate groups back together
|
| 48 |
+
# reconstructed = torch.cat(decoded_groups, dim=1)
|
| 49 |
+
return reconstructed
|