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
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
?
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!