Operation that created tensor

Is it possible to assign an attribute to the add operation?
More specifically, after e.g. training a neural network, I want something like the following code to work :

if output.attribute == ‘addition’:


We don’t provide anything like that.
But you can set any attribute you want on Tensors (that are not already used). So you can do this yourself if you want.