Thank you for your reply in your busy time. Thank you for your advice. 

I opened the adjoint_0.fsp simulation file with the optimized geometry shown as polygon, then run the python script with some commands copied from the original python script as shown below. I put Lumerical_GDS_auto_export.lsfx and the python file in the same folder as the adjoint_0.fsp simulation file. However, after running the python script, a GDS file was not generated. 

I also tried to use the sample script "gds_contour.lsf" obtained from, but it did not work.