Print the operators in a relay model

Hi, I’d like to print all the operators in the relay model with their arguments, before and after some optimizations.print(func.astext(show_meta_data=False)) can print out before the relay build:

but how to do it after relay.build_module.build, or in C++ how to print out the intermediate transformation outputs between the optimizations?

Thanks.

You can use AsText(func, false) in C++ to do that.

Hello, if I use the AsText(func, false, null) in gdb, it shows “Invalid cast.”。 Can you help me?