luo3300612 / image-captioning-DLCT

Official pytorch implementation of paper "Dual-Level Collaborative Transformer for Image Captioning" (AAAI 2021).
BSD 3-Clause "New" or "Revised" License
193 stars 31 forks source link

parameter error #6

Closed lixiangpengcs closed 3 years ago

lixiangpengcs commented 3 years ago

Class SelfAtt module includes a MultiHeadAttention module. In its forward function, the self.mhatt receives 6 parameters (q, k, values, relative_geometry_weights, attention_mask, attention_weights). However, there are 5 parameters in MultiHeadAttention's forward function (queries, keys, values,box_relation_embed_matrix, attention_mask, attention_weights). Is this an error? Should it replace MultiHeadAttention with MultiHeadBoxAttention?

luo3300612 commented 3 years ago

here, we import MultiHeadBoxAttention as MultiHeadAttention