Where does the layout transform of each op happen during alter_op_layout pass?

I see, so are you saying the inputs in line 114 are already 5D? Or they’re somehow converted to 5D?

Btw, here are you saying NCHW’s inputs can only be 4D and NCHWc’s 5D/6D? I’m actually experimenting a customer op. How do I let it accept both 4D and 5D/6D inputs?