Loss function and asserts on Tau