Skip to content

Commit dbd2afa

Browse files
committed
Refactor aggregation method in aggregation_methods.py
- Removed unused variable tau - Cleaned up commented-out code for better readability.
1 parent 82244ce commit dbd2afa

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

fmpose3d/aggregation_methods.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,13 @@ def aggregation_RPEA_joint_level(
166166
dist[:, :, 0] = 0.0
167167

168168
# Convert 2D losses to weights using softmax over top-k hypotheses per joint
169-
tau = float(getattr(args, "weight_softmax_tau", 1.0))
170169
H = dist.size(1)
171170
k = int(getattr(args, "topk", None))
172-
# print("k:", k)
173-
# k = int(H//2)+1
174171
k = max(1, min(k, H))
175172

176173
# top-k smallest distances along hypothesis dim
177174
topk_vals, topk_idx = torch.topk(dist, k=k, dim=1, largest=False) # (B,k,J)
178175

179-
# Weight calculation method ; weight_method = 'exp'
180176
temp = args.exp_temp
181177
max_safe_val = temp * 20
182178
topk_vals_clipped = torch.clamp(topk_vals, max=max_safe_val)

0 commit comments

Comments
 (0)