I'm 18 weeks pregnant, and I have smoked weed a few times since being pregnant. Wilk my baby be ok? I plan on stopping smoking.

Undue danger. You are aware this is totally wrong and unnecessary right? You are responsible for 2 beings now. Please stop smoking weed.
Prob harmful. We know smoking cigarettes can harm babies. We also know babies are born addicted to drugs. We also know certain drugs cause deformities. What you eat and breath in goes to your baby. There's a chance your baby can be born deformed. You shouldn't plan on stopping smoking, you should stop now.
Stop now & abstain. We have data suggesting these kids can be born with smaller heads & the data on behavioral or learning problems is unclear.If you don't stop now, it will continue to do damage & be retained in babies system. A thorough drug screen will detect it. In my state, baby would go to foster care and you would face child endangerment charges.
Many problems. Exposing a fetus/embryo to mj can cause chromosomal damage, prematurity and learning disabilities. It's best for everyone to stop now. Also, consider that you are a responsible parent to be, doing something you know is bad & illegal. What does that say about your decision making as a parent. Please stop now.