LzVv123456 / Contrastive-Prototypical-Prompt

Apache License 2.0
20 stars 0 forks source link

About losses.py #1

Closed vanity1129 closed 11 months ago

vanity1129 commented 11 months ago

Hi, @LzVv123456

May I ask what is the practical meaning of the code in lines 189-191 in the losses.py file because they look syntax-wrong and do not execute anything. # mask off pairs among prototypes p_mask[sample_num+1: sample_num+1:] = 0 n_mask[sample_num+1: sample_num+1:] = 0

LzVv123456 commented 11 months ago

Hi, Thanks for pointing out this issue! It is indeed a typo. You can safely delete it. I believe It is originally designed to mask off uneffective pairs, i.e., prototypes and themselves.

vanity1129 commented 11 months ago

Okay, Thx for your reply~