This paper focuses on designing a multiple-input multiple-output (MIMO) Internet-of-Things (IoT) oriented cognitive multi relay network (CMRN), where the secondary system (SS) consists of IoT nodes. Randomly placed multiple IoT nodes help in data transmission between two IoT users, i.e., a secondary transmitter (ST) and a secondary receiver (SR). Specifically, the problem of designing energy-efficient precoders at ST and SR is considered. The problem is addressed in two steps, first, a closed-form solution for the precoders is derived. Secondly, optimal precoders weight are used to select the best relay that assists the transmission between ST and SR nodes, ensuring maximum end-to-end energy efficiency (E2E-EE) at the SS. However, as the number of relays increases, the computational complexity of the solution also increases. Therefore, achieving a balance between the number of relays and computational feasibility is essential for optimal performance. To ensure fast communication system, deep learning (DL) based framework is employed for precoder design and relay selection, which offers solution with high precision and fast execution time. This approach effectively minimizes power consumption in the IoT nodes while maintaining the Quality of Service (QoS) of the primary and secondary systems. Numerical results demonstrate the impact of relay selection and precoder design on the achievable E2E-EE at SS. The DL scheme achieves comparable performance and much lower complexity than the conventional method while demonstrating lower runtime, particularly when the number of relays is large.