Action-Localization icon indicating copy to clipboard operation
Action-Localization copied to clipboard

How is classification weights determined? I am confused by the code, thanks!

Open ackbar03 opened this issue 6 years ago • 1 comments

Hi,

I am having trouble understanding this part of the code. if inds.numel() > 0: out_inds = torch.arange(inds[-1].item(), inds[-1].item() + inds.numel() // 1) cls_inside_weights[inds] = 1 cls_inside_weights[out_inds] = 1

https://github.com/leaderj1001/Action-Localization/blob/master/action-transformer/nets/proposal_target_layer.py#L67

As I understand this is to set the weights for the classification loss.

However, I do not understand the value of out_inds. Why is it an array of values from inds[-1].item(), inds[-1].item() + inds.numel()? This seems very arbitrary, I cannot understand the logic behind this

Is it ok to set the classification loss weights all to 1? such as cls_inside_weights[:] = 1 ?

Thank you!

ackbar03 avatar Nov 23 '19 17:11 ackbar03

I encountered the same error . Have you solved it? Can you tell me how to deal with it . Thanks~

1529046970 avatar Apr 15 '20 13:04 1529046970