Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yolo loss训练未降 #77

Open
davidqing2000 opened this issue May 28, 2020 · 4 comments
Open

Yolo loss训练未降 #77

davidqing2000 opened this issue May 28, 2020 · 4 comments

Comments

@davidqing2000
Copy link

Yolo_loss类中提及以下代码
以下两个相同数组的相减,其值不总是零吗? 有何用意?

                target[b, a, j, i, 0] = **truth_x_all[b, ti] - truth_x_all[b, ti]**.to(torch.int16).to(torch.float)
                target[b, a, j, i, 1] = **truth_y_all[b, ti] - truth_y_all[b, ti]**.to(torch.int16).to(torch.float)
@love2learn-7179
Copy link

I think that the first truth_x_all is floating points while the second one is int. therefore the value after the subtraction is the digits after the decimal point.

@whuzt
Copy link

whuzt commented May 28, 2020

得到的是小数部分?

@shanniruo
Copy link

得到小数部分,yolo回归的就是这个小数

@oreo-lp
Copy link

oreo-lp commented Jun 3, 2020

我是这样理解的:
(1)我认为这两者的差表示的是tx和ty,因为我们prediction就是直接预测的tx,ty,所有ground truth就需要转换成相应的tx和ty。
(2)truth_x_all[b, ti]表示的是ground truth的实际x,y坐标,truth_x_all[b, ti]**.to(torch.int16).to(torch.float)表示的就是groudn truth位于哪个grid中。比如ground truth的(x,y)坐标是(45.5, 36.6),那这个ground truth所属的就是x=45,y=36所在的grid。那么tx和分别就是0.5和0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants