Calculates the negation of a tensor.