Non-orthogonal multiple access (NOMA) is considered to be one of the best candidates for future networks due to its ability to serve multiple users using the same resource block. Although early studies have focused on transmission reliability and energy efficiency, recent works are considering cooperation among the nodes. The cooperative NOMA techniques allow the user with a better channel (near user) to act as a relay between the source and the user experiencing poor channel (far user). This paper considers the link security aspect of energy harvesting cooperative NOMA users. In particular, the near user applies the decode-and-forward (DF) protocol for relaying the message of the source node to the far user in the presence of an eavesdropper. Moreover, we consider that all the devices use power-splitting architecture for energy harvesting and information decoding. We derive the analytical expression of intercept probability. Next, we employ deep learning based optimization to find the optimal power allocation factor. The results show the robustness and superiority of deep learning optimization over conventional iterative search algorithm.