Inverse design optimization of a mode converter