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

input_res的格式是什么? #31

Closed
long2double opened this issue Jan 19, 2020 · 3 comments
Closed

input_res的格式是什么? #31

long2double opened this issue Jan 19, 2020 · 3 comments
Labels
question Further information is requested

Comments

@long2double
Copy link

flops, params = get_model_complexity_info(net, input_res=(3, 256, 512), input_constructor=prepare_input, as_strings=True, print_per_layer_stat=True)

input_res的格式是什么?channel,row,col?还是channel,col,row?

@sovrasov
Copy link
Owner

Pytorch uses the NCHW data layout and the input res parameter follows this practice. So in your terms the order is channel, row, col.

@sovrasov sovrasov added the question Further information is requested label Jan 23, 2020
@puyiwen
Copy link

puyiwen commented Apr 7, 2023

Pytorch 使用 NCHW 数据布局,input res参数也遵循这种做法。所以用你的话来说,顺序是通道、行、列。

Hi, if my model input is dict, and the dict have many keys, how can I set the input_res? Can you tell me an example code? Thank you very much!

@sovrasov
Copy link
Owner

Pytorch 使用 NCHW 数据布局,input res参数也遵循这种做法。所以用你的话来说,顺序是通道、行、列。

Hi, if my model input is dict, and the dict have many keys, how can I set the input_res? Can you tell me an example code? Thank you very much!

Using input_constructor functionality you can shape any input dict, see #14

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

No branches or pull requests

3 participants