Hlings / AsyFOD

(CVPR2023) The PyTorch implementation of the "AsyFOD: An Asymmetric Adaptation Paradigm for Few-Shot Domain Adaptive Object Detection".
MIT License
33 stars 3 forks source link

Question: stop gradient #2

Closed MinnSetMoeHein closed 11 months ago

MinnSetMoeHein commented 12 months ago

Hi! Can i check where is the stop gradient implemented in the code?

Hlings commented 12 months ago

Sure :) You can check this line, which I used to implement the stop-gradient operation. Specifically, using torch.detach()

MinnSetMoeHein commented 12 months ago

Thank you very much for a prompt reply! and also, why is the backbone output shape [B, 1280, H, W] instead of [B, 1024, H, W]?

Hlings commented 12 months ago

The reason lies in the design of the backbone in Yolo v5. The output dimension of DarkNet (CSP) is 1280 rather than the common 1024 like ResNet50. I hope this answer finds you well :). You can also modify the backbone if something is necessary.

MinnSetMoeHein commented 12 months ago

Thank you for your answers!