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

Unsupport the high dimension inputs that larger than 5. #135

Open
hailong23-jin opened this issue Jul 21, 2023 · 0 comments
Open

Unsupport the high dimension inputs that larger than 5. #135

hailong23-jin opened this issue Jul 21, 2023 · 0 comments

Comments

@hailong23-jin
Copy link

hailong23-jin commented Jul 21, 2023

It raises an assert error in the following code when our input shape is [B, C, H, W, h, w], whose dimension is larger than 5. Can I directly modify 5 to 6? Does it effect the final results?

def norm_flop_jit(inputs: List[Any], outputs: List[Any]) -> Number:
"""
Count flops for norm layers.
"""
# Inputs[0] contains the shape of the input.
input_shape = get_shape(inputs[0])
has_affine = get_shape(inputs[affine_arg_index]) is not None
assert 2 <= len(input_shape) <= 5, input_shape
# 5 is just a rough estimate
flop = prod(input_shape) * (5 if has_affine else 4)
return flop

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