Dan Jacobellis commited on
Commit
9f1542c
1 Parent(s): 4592d83

convert checkpoints

Browse files
Files changed (9) hide show
  1. RGB_16x.json +20 -0
  2. RGB_16x.pth +3 -0
  3. RGB_4x.json +20 -0
  4. RGB_4x.pth +3 -0
  5. convert_checkpoint.ipynb +103 -0
  6. stereo_20x.json +23 -0
  7. stereo_20x.pth +3 -0
  8. stereo_5x.json +23 -0
  9. stereo_5x.pth +3 -0
RGB_16x.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 64,
3
+ "num_workers": 12,
4
+ "grad_accum_steps": 1,
5
+ "plot_update": 128,
6
+ "patience": 64,
7
+ "min_lr": 1e-07,
8
+ "max_lr": 3e-05,
9
+ "warmup_steps": 50000,
10
+ "weight_decay": 0.0,
11
+ "epochs": 150,
12
+ "\u03c6": 0.0,
13
+ "channels": 3,
14
+ "J": 3,
15
+ "Ne": null,
16
+ "Nd": 768,
17
+ "latent_dim": 12,
18
+ "latent_bits": 8,
19
+ "lightweight_encode": true
20
+ }
RGB_16x.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d949575e21fa5a1f34622436e09e507e97b2d90328354b86a56b54fd9e64275a
3
+ size 227567760
RGB_4x.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 64,
3
+ "num_workers": 12,
4
+ "grad_accum_steps": 1,
5
+ "plot_update": 128,
6
+ "patience": 64,
7
+ "min_lr": 1e-07,
8
+ "max_lr": 3e-05,
9
+ "warmup_steps": 50000,
10
+ "weight_decay": 0.0,
11
+ "epochs": 150,
12
+ "\u03c6": 0.0,
13
+ "channels": 3,
14
+ "J": 3,
15
+ "Ne": null,
16
+ "Nd": 768,
17
+ "latent_dim": 48,
18
+ "latent_bits": 8,
19
+ "lightweight_encode": true
20
+ }
RGB_4x.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7088d00bf3bf12f04d8e9a840fd324485d58ce0f6938d7f112773f80119beea
3
+ size 228587594
convert_checkpoint.ipynb ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "acb05338-490d-44c8-9923-7fb70d3465a2",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import torch\n",
11
+ "import json\n",
12
+ "class Config:pass"
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "code",
17
+ "execution_count": 2,
18
+ "id": "7dcd2d48-0ad7-4cde-99f7-d8c719026a85",
19
+ "metadata": {},
20
+ "outputs": [],
21
+ "source": [
22
+ "walloc_20x = torch.load(\"Stereo_Li_27c_test2.pth\",map_location='cpu', weights_only=False)\n",
23
+ "config = walloc_20x['config']\n",
24
+ "with open('stereo_20x.json', 'w') as f:\n",
25
+ " json.dump(config.__dict__, f, indent=4)\n",
26
+ "del walloc_20x['config']\n",
27
+ "torch.save(walloc_20x, 'stereo_20x.pth')"
28
+ ]
29
+ },
30
+ {
31
+ "cell_type": "code",
32
+ "execution_count": 3,
33
+ "id": "0b5ddce5-8f83-484b-9a86-b6e3b799904c",
34
+ "metadata": {},
35
+ "outputs": [],
36
+ "source": [
37
+ "walloc_5x = torch.load(\"Stereo_Li_108c_test2.pth\",map_location='cpu', weights_only=False)\n",
38
+ "config = walloc_5x['config']\n",
39
+ "with open('stereo_5x.json', 'w') as f:\n",
40
+ " json.dump(config.__dict__, f, indent=4)\n",
41
+ "del walloc_5x['config']\n",
42
+ "torch.save(walloc_20x, 'stereo_5x.pth')"
43
+ ]
44
+ },
45
+ {
46
+ "cell_type": "code",
47
+ "execution_count": 4,
48
+ "id": "0de59093-db74-4b08-ac45-f1b832529dcb",
49
+ "metadata": {},
50
+ "outputs": [],
51
+ "source": [
52
+ "walloc_16x = torch.load(\"RGB_Li_12c_J3_nf8_v1.0.2.pth\",map_location='cpu', weights_only=False)\n",
53
+ "config = walloc_16x['config']\n",
54
+ "with open('RGB_16x.json', 'w') as f:\n",
55
+ " json.dump(config.__dict__, f, indent=4)\n",
56
+ "del walloc_16x['config']\n",
57
+ "del walloc_16x['i_epoch']\n",
58
+ "del walloc_16x['learning_rates']\n",
59
+ "del walloc_16x['dist_losses']\n",
60
+ "torch.save(walloc_16x, 'RGB_16x.pth')"
61
+ ]
62
+ },
63
+ {
64
+ "cell_type": "code",
65
+ "execution_count": 5,
66
+ "id": "235117df-ddf4-4f72-a5a8-8395412f8eff",
67
+ "metadata": {},
68
+ "outputs": [],
69
+ "source": [
70
+ "walloc_4x = torch.load(\"RGB_Li_48c_J3_nf8_v1.0.2.pth\",map_location='cpu', weights_only=False)\n",
71
+ "config = walloc_4x['config']\n",
72
+ "with open('RGB_4x.json', 'w') as f:\n",
73
+ " json.dump(config.__dict__, f, indent=4)\n",
74
+ "del walloc_4x['config']\n",
75
+ "del walloc_4x['i_epoch']\n",
76
+ "del walloc_4x['learning_rates']\n",
77
+ "del walloc_4x['dist_losses']\n",
78
+ "torch.save(walloc_4x, 'RGB_4x.pth')"
79
+ ]
80
+ }
81
+ ],
82
+ "metadata": {
83
+ "kernelspec": {
84
+ "display_name": "Python 3 (ipykernel)",
85
+ "language": "python",
86
+ "name": "python3"
87
+ },
88
+ "language_info": {
89
+ "codemirror_mode": {
90
+ "name": "ipython",
91
+ "version": 3
92
+ },
93
+ "file_extension": ".py",
94
+ "mimetype": "text/x-python",
95
+ "name": "python",
96
+ "nbconvert_exporter": "python",
97
+ "pygments_lexer": "ipython3",
98
+ "version": "3.12.3"
99
+ }
100
+ },
101
+ "nbformat": 4,
102
+ "nbformat_minor": 5
103
+ }
stereo_20x.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 32,
3
+ "num_workers": 24,
4
+ "grad_accum_steps": 1,
5
+ "plot_update": 64,
6
+ "patience": 64,
7
+ "min_lr": 1e-07,
8
+ "max_lr": 3e-05,
9
+ "warmup_steps": 5000,
10
+ "weight_decay": 0.0,
11
+ "epochs": 30,
12
+ "epoch_len": 10000,
13
+ "\u03c6": 0.0,
14
+ "audio_length": 524288,
15
+ "channels": 2,
16
+ "J": 8,
17
+ "Ne": null,
18
+ "Nd": 768,
19
+ "latent_dim": 27,
20
+ "latent_bits": 8,
21
+ "lightweight_encode": true,
22
+ "post_filter": true
23
+ }
stereo_20x.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43708403f8ed1c0d9d4aa1423b258fccda2e25506f84804bb82571c9e463fd6a
3
+ size 60821346
stereo_5x.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 32,
3
+ "num_workers": 24,
4
+ "grad_accum_steps": 1,
5
+ "plot_update": 64,
6
+ "patience": 64,
7
+ "min_lr": 1e-07,
8
+ "max_lr": 3e-05,
9
+ "warmup_steps": 5000,
10
+ "weight_decay": 0.0,
11
+ "epochs": 30,
12
+ "epoch_len": 10000,
13
+ "\u03c6": 0.0,
14
+ "audio_length": 524288,
15
+ "channels": 2,
16
+ "J": 8,
17
+ "Ne": null,
18
+ "Nd": 768,
19
+ "latent_dim": 108,
20
+ "latent_bits": 8,
21
+ "lightweight_encode": true,
22
+ "post_filter": true
23
+ }
stereo_5x.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56057a2cf5b6628c3fae2834ada81dea0d64c9b6e0d1377fc07f1d96730f1299
3
+ size 60821257