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

get_flops函数 #92

Open
zswzswzsw233 opened this issue Dec 24, 2024 · 0 comments
Open

get_flops函数 #92

zswzswzsw233 opened this issue Dec 24, 2024 · 0 comments

Comments

@zswzswzsw233
Copy link

在get_flops脚本的construct_input函数中,构建输入数据时,对于时序输入的模型,是不是修改一下N=6?例如改成12
def construct_input(input_shape):
rot = torch.eye(4).float().cuda().view(1, 1, 4, 4).expand(1,6,4,4)

intrins = torch.eye(3).float().cuda().view(1,1, 3, 3).expand(1,6,3,3)
input = dict(img_inputs=[
    torch.ones(()).new_empty((1, 6, *input_shape)).cuda(), rot,
    rot, intrins, intrins,
    torch.ones((1, 6, 3)).cuda(),
    torch.eye(3).float().cuda().view(1, 3, 3)
])
return input
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

1 participant