Hi~
When traversing the model, I try to create a new call and add it to the original model. But a problem has been bothering me.
I know I can create a new Call by tvm.relay.expr.Call(op,args,attrs)
and create a new op by
tvm.relay.op.get("nn.bias_add")
.And I can get args by original call.
But How can I create a new attrs? I need a atrrs which class is tvm.relay.op.op_attrs.BiasAddattrs
. I tried a lot of ways, but they didn’t work. Attrs is an optional option in the definition of call. But model couldn’t work if I ignore it.
What I’m doing now is copying one from the previous bias add. But my original model probably has no bias. So I need to create a new one.
I would be very grateful if you could give me some suggestions.