No, Hermies are caused from stress. They are both sexes. Heat stress, watering, lights, all these things can contribute to a plant becomming a hermie.

Hermie plants can also grow naturally, but it's extremely rare. 99.9% of hermies are from stress the grower has put on the plant.

but you might be the .1% that was just unlucky and got a hermie naturally.