YU1ut / imprinted-weights

Code for 'Low-Shot Learning with Imprinted Weights'
68 stars 24 forks source link

magic number #5

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi, Is the magic number[100] in new_weight a class number? new_weight = torch.zeros(100, d_emb) for i in range(100): tmp = output_stack[target_stack == (i + 100)].mean(0) if not random else torch.randn(d_emb, device=device) new_weight[i] = tmp / tmp.norm(p=2)