Beam losses at injection energy and during acceleration in the Tevatron