Either case should be possible with tvm transformation pass.
If you need to preserve conv2d
and biad_add
, an alternative way to achieve this is to perform such transform in original models before exporting to TVM.
For example, I used to use this script to fuse bn into conv.