Tensor invariants