Ohh, I thought my bad! Thanks a lot. There is only a slight problem.
This is what I get. It adds an additional statement into relay IR ( %3 = add(%x1, %y1) and returns the result.
fn (%x1: Tensor[(1, 1, 1, 20), float32], %y1: Tensor[(1, 1, 1, 20), float32]) {
%0 = add(%x1, %y1);
%1 = subtract(%x1, %y1);
%2 = multiply(%0, %1);
%3 = add(%x1, %y1);
(%2, %3)
}
This is ideally, what Iād like to create. @mbrookhart ā Is there something that I can do to fix this?
fn (%x1: Tensor[(1, 1, 1, 20), float32], %y1: Tensor[(1, 1, 1, 20), float32]) {
%0 = add(%x1, %y1);
%1 = subtract(%x1, %y1);
%2 = multiply(%0, %1);
(%2, %0)
}