How to get moving_var and moving_mean in batchnorm layer in Relay

Hi guys, I’m trying BYOC for my hardware, but I don’t know how to get the moving_var and moving_mean of the batchnorm layer from the callnode when I code the codegen part. I see nn.relay doesn’t pass these arguments. So how can I get these arguments?

To access the moving variance (moving_var) and moving mean (moving_mean) in a batch normalization layer in Relay for BYOC, you can use the nn.get_scale and nn.get_bias functions to obtain the scale and bias parameters, respectively, and then compute the moving_var and moving_mean based on these values in your codegen implementation. capcut