diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-13 11:15:19 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-13 11:15:19 +0800 |
commit | 2ed37d21aac148dcec068590decb8eaff892d23b (patch) | |
tree | a912ae6d8ecc9f4ce10f3ac025391c682837ff99 | |
parent | f6706981fd9e0608f25c6528467394508cfa2afc (diff) | |
parent | cdf2d2e00ff719e46b0d4bef46dabb1ddfe144dc (diff) |
Merge branch 'master' into python3.8
-rw-r--r-- | config.py | 2 | ||||
-rw-r--r-- | models/model.py | 6 | ||||
-rw-r--r-- | test/model.py | 17 |
3 files changed, 14 insertions, 11 deletions
@@ -95,6 +95,6 @@ config: Configuration = { # Restoration iteration (multiple models, e.g. nm, bg and cl) 'restore_iters': (0, 0, 0), # Total iteration for training (multiple models) - 'total_iter': (80_000, 80_000, 80_000), + 'total_iters': (80_000, 80_000, 80_000), }, } diff --git a/models/model.py b/models/model.py index 5ddcf90..c0adc41 100644 --- a/models/model.py +++ b/models/model.py @@ -82,7 +82,9 @@ class Model: @property def _model_sig(self) -> str: - return '_'.join((self._model_name, self.curr_iter, self.total_iter)) + return '_'.join( + (self._model_name, str(self.curr_iter), str(self.total_iter)) + ) @property def _checkpoint_sig(self) -> str: @@ -95,7 +97,7 @@ class Model: @property def _log_sig(self) -> str: - return '_'.join((self._model_name, self.total_iter, self._hp_sig, + return '_'.join((self._model_name, str(self.total_iter), self._hp_sig, self._dataset_sig, str(self.pr), str(self.k))) @property diff --git a/test/model.py b/test/model.py index 8122989..f7fc57e 100644 --- a/test/model.py +++ b/test/model.py @@ -16,10 +16,10 @@ def test_default_signature(): 'runs', 'logs', 'RGB-GaitPart_80000_64_128_128_64_1_2_4_True_True_32_5_' '3_3_3_3_3_2_1_1_1_1_1_0_2_3_4_16_256_0.2_0.0001_0.9_' '0.999_0.001_500_0.9_CASIA-B_74_30_15_3_64_32_8_16') - assert model._checkpoint_sig == ('RGB-GaitPart_80000_0_64_128_128_64_1_2_4_True_' - 'True_32_5_3_3_3_3_3_2_1_1_1_1_1_0_2_3_4_16_' - '256_0.2_0.0001_0.9_0.999_0.001_500_0.9_CASIA-B' - '_74_30_15_3_64_32_8_16') + assert model._checkpoint_sig == ('RGB-GaitPart_0_80000_64_128_128_64_1_2_4_' + 'True_True_32_5_3_3_3_3_3_2_1_1_1_1_1_0_2_' + '3_4_16_256_0.2_0.0001_0.9_0.999_0.001_' + '500_0.9_CASIA-B_74_30_15_3_64_32_8_16') def test_default_signature_with_selector(): @@ -34,7 +34,8 @@ def test_default_signature_with_selector(): '3_3_3_3_3_2_1_1_1_1_1_0_2_3_4_16_256_0.2_0.0001_0.9_' '0.999_0.001_500_0.9_CASIA-B_74_30_15_3_64_32_bg-0\\d_' 'nm-0\\d_8_16') - assert model._checkpoint_sig == ('RGB-GaitPart_80000_0_64_128_128_64_1_2_4_True_' - 'True_32_5_3_3_3_3_3_2_1_1_1_1_1_0_2_3_4_16_' - '256_0.2_0.0001_0.9_0.999_0.001_500_0.9_CASIA-B' - '_74_30_15_3_64_32_bg-0\\d_nm-0\\d_8_16') + assert model._checkpoint_sig == ('RGB-GaitPart_0_80000_64_128_128_64_1_2_4_' + 'True_True_32_5_3_3_3_3_3_2_1_1_1_1_1_0_2_' + '3_4_16_256_0.2_0.0001_0.9_0.999_0.001_' + '500_0.9_CASIA-B_74_30_15_3_64_32_bg-0\\d_' + 'nm-0\\d_8_16') |