training samples loop to match number of opposite samples