diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:11:25 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-08 18:25:42 +0800 |
commit | 99ddd7c142a4ec97cb8bd14b204651790b3cf4ee (patch) | |
tree | a4ccbd08a7155e90df63aba60eb93ab2b7969c9b /config.py | |
parent | 507e1d163aaa6ea4be23e7f08ff6ce0ef58c830b (diff) |
Code refactoring, modifications and new features
1. Decode features outside of auto-encoder
2. Turn off HPM 1x1 conv by default
3. Change canonical feature map size from `feature_channels * 8 x 4 x 2` to `feature_channels * 2 x 16 x 8`
4. Use mean of canonical embeddings instead of mean of static features
5. Calculate static and dynamic loss separately
6. Calculate mean of parts in triplet loss instead of sum of parts
7. Add switch to log disentangled images
8. Change default configuration
Diffstat (limited to 'config.py')
-rw-r--r-- | config.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -8,6 +8,8 @@ config: Configuration = { 'CUDA_VISIBLE_DEVICES': '0', # Directory used in training or testing for temporary storage 'save_dir': 'runs', + # Recorde disentangled image or not + 'image_log_on': False }, # Dataset settings 'dataset': { @@ -46,11 +48,13 @@ config: Configuration = { 'ae_feature_channels': 64, # Appearance, canonical and pose feature dimensions 'f_a_c_p_dims': (128, 128, 64), + # Use 1x1 convolution in dimensionality reduction + 'hpm_use_1x1conv': False, # HPM pyramid scales, of which sum is number of parts 'hpm_scales': (1, 2, 4), # Global pooling method 'hpm_use_avg_pool': True, - 'hpm_use_max_pool': True, + 'hpm_use_max_pool': False, # FConv feature channels coefficient 'fpfe_feature_channels': 32, # FConv blocks kernel sizes @@ -65,13 +69,13 @@ config: Configuration = { 'tfa_num_parts': 16, # Embedding dimension for each part 'embedding_dims': 256, - # Triplet loss margin - 'triplet_margin': 0.2, + # Triplet loss margins for HPM and PartNet + 'triplet_margins': (0.2, 0.2), }, 'optimizer': { # Global parameters # Iteration start to optimize non-disentangling parts - # 'start_iter': 10, + # 'start_iter': 0, # Initial learning rate of Adam Optimizer 'lr': 1e-4, # Coefficients used for computing running averages of |