Solved by SimonW in post #2 
              
              
                The error message is very clear. You even hid the trace so I can’t know which call errors, but it seems to require two input tensors to have same numel. You can check that and skip if you want.