summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-02-27 22:14:21 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-02-27 22:14:21 +0800
commit46391257ff50848efa1aa251ab3f15dc8b7a2d2c (patch)
tree1e04084a9f0e42a7421b951134dd0588ea691c08 /config.py
parent9001f7e13d8985b220bd218d8de716bc586dbdcf (diff)
Implement Batch Hard triplet loss and soft margin
Diffstat (limited to 'config.py')
-rw-r--r--config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/config.py b/config.py
index 03f2f0d..f76cea5 100644
--- a/config.py
+++ b/config.py
@@ -63,8 +63,10 @@ config: Configuration = {
'tfa_num_parts': 16,
# Embedding dimension for each part
'embedding_dims': 256,
- # Triplet loss margins for HPM and PartNet
- 'triplet_margins': (1.5, 1.5),
+ # Batch Hard or Batch All
+ 'triplet_is_hard': True,
+ # Triplet loss margins for HPM and PartNet, None for soft margin
+ 'triplet_margins': None,
},
'optimizer': {
# Global parameters