Inverse design of an apodized grating coupler through shape optimization