Why TOPI does not support batch_normalization?

Hello!

i want to make VGG-16 with Batch Normalization(BN) by using TOPI. but TOPI does not support BN but relay has. If I use TOPI, do I have to implement it myself?

1 Like

Because batch_normalization will be decomposed to a set of add/subtract/multiply ops when lowering a Relay graph to TVM IR.

1 Like

thank you for the reply.

So if i don’t use Relay, i have to implement it myself?

I’m afraid so. Batch norm was removed from TOPI about an year ago: https://github.com/apache/incubator-tvm/pull/2626

1 Like

Okay. I need to implement it myself.

Thank you!

Do we still need Batch norm in training?

Yes, batch norm in training is not supported

How about layer norm and instance normalization? Do we need to implement them by ourselves since I didn’t see them in topi either. Thanks!!!