Rachel Bilson has opened up about her pregnancy losses before having her daughter