DearCaat / MHIM-MIL

[ICCV 2023 Oral] Multiple Instance Learning Framework with Masked Hard Instance Mining for Whole Slide Image Classification
63 stars 3 forks source link

A code error #23

Open yang-ze-kang opened 2 days ago

yang-ze-kang commented 2 days ago

I see an error in your code. When applying gradient accumulation, the 'train_loss.backward()' should be applied in each batch.

DearCaat commented 2 days ago

In fact, this code does not support gradient accumulation, and I did not use that technique. I've removed this part of the code in the code repository for now, thank you very much for your feedback.