Open surprise2001 opened 3 weeks ago
我有看到有个issues是说了相关的,说是输出之后再转置,那有没有办法就是在做转换的时候就不做那个变换,仍然保持NCHW
I think it's completely feasible, you should make some change at file(utils/graph_tools.py#35, function build_tf_inputs
), make input's layout to FORCE_CHANNEL_FIRST_OP
.
For example, when I convert a model, the original input shape is [1,1,7680], but after conversion, the shape becomes [1,7680,1]. Although I can initialize the data with the corresponding shape when using the model to perform inference without affecting the results, I still want to know if there's a way to avoid modifying the original shape.