Pulse shaping is a powerful tool for mitigating implosion instabilities in directdrive inertial confinement fusion. However, the high-dimensional and nonlinear nature of implosions makes the pulse optimization quite challenging. In this research, we develop a machine learning pulse shape designer to achieve high compression density and stable implosion. The facility-specific laser imprint pattern is considered in the optimization, which makes the pulse design more relevant. The designer is applied to the novel doublecone ignition scheme, and simulation shows that the optimized pulse increases the areal density expectation by 16% in 1-D, and the clean-fuel thickness by a factor of 4 in 2-D. This pulse shape designer could be a useful tool for direct-drive ICF instability control.