What does it smell of? Ugly FO/EO or?
If it's FO or EO some will evaporate while cooking. But I don't think of any other way to get rid of badly fragranced soap.
If you can stand it, you can let it sit for few weeks. Whatever the smell is, it might mellow out and then rebatch.
Edited to add: whatever it is, if you have to toss in rubbish, don't get upset. It's all the part of learning experience. I've had fare share of disappointing batches, mainly due to FOs. Some I managed to rescue, some just ended up in rubbish. What I learnt though, is to never ever again use a whole batch to test new fragrance, however it might be tempting. Now I make a batch of soap batter, spread it out to 1/2 cup sizes soaps, scent each one with one FO and test FOs that way.