My apologies. I assumed that when an Op returns a tensor, it won’t be differentiable (We need a variable right?)
Maybe in the new update, where they merged tensors and variable, it behaves as you expect. I am not entirely sure.