From 9c0dde1f8fbd16f3d1e9e2a0f7dff7abfd6482d2 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Fri, 12 Mar 2021 15:37:53 +0800 Subject: A type hint fix --- models/rgb_part_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/rgb_part_net.py b/models/rgb_part_net.py index 3a5777e..6e72e38 100644 --- a/models/rgb_part_net.py +++ b/models/rgb_part_net.py @@ -20,7 +20,7 @@ class RGBPartNet(nn.Module): hpm_use_max_pool: bool = True, tfa_squeeze_ratio: int = 4, tfa_num_parts: int = 16, - embedding_dims: tuple[int] = (256, 256), + embedding_dims: Tuple[int] = (256, 256), image_log_on: bool = False ): super().__init__() -- cgit v1.2.3 From 5c4483ea0c7b2e9166f94d6b6e3b8a070eb959f2 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Fri, 12 Mar 2021 20:36:27 +0800 Subject: Fix a typo when record none-zero counts --- models/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/model.py b/models/model.py index b09d600..89b34aa 100644 --- a/models/model.py +++ b/models/model.py @@ -273,7 +273,7 @@ class Model: 'PartNet': losses[4] }, self.curr_iter) # None-zero losses in batch - if hpm_num_non_zero is not None and hpm_num_non_zero is not None: + if hpm_num_non_zero is not None and pn_num_non_zero is not None: self.writer.add_scalars('Loss/non-zero counts', { 'HPM': hpm_num_non_zero.mean(), 'PartNet': pn_num_non_zero.mean() -- cgit v1.2.3