Yes. According to rule 44.2 the penalty was two turns including two tacks and two gybes in the same direction. It does not matter that the penalty was begun before the starting signal.