marshuang80 / gloria

GLoRIA: A Multimodal Global-Local Representation Learning Framework forLabel-efficient Medical Image Recognition
Apache License 2.0
173 stars 29 forks source link

Some questions about the similarities? #14

Open Liqq1 opened 1 year ago

Liqq1 commented 1 year ago

In the gloria_model.py/def get_local_similarities(130), row_sim is computed by "max"

 row_sim, max_row_idx = torch.max(row_sim, dim=1, keepdim=True)  # [48, 1]

and, in the gloria_loss.py / def local_loss(120), row_sim is computed by "sum"/mean

 if agg == "sum":
     row_sim = row_sim.sum(dim=1, keepdim=True)  # [48, 1]
 else:
     row_sim = row_sim.mean(dim=1, keepdim=True)  # [48, 1]
tzcskys commented 1 year ago

Hi Liqq1, I also have the same question about this, do you have a explanation or suspect for this? Thansk a lot.

Liqq1 commented 1 year ago

Hi Liqq1, I also have the same question about this, do you have a explanation or suspect for this? Thansk a lot.

Sorry, I haven't caught on yet. Are you working on that too? Maybe we can add a contact information and talk about it.😊