Cognitive Radio (CR) is a practical technique for overcoming spectrum inefficiencies by sensing and utilizing spectrum holes over a wide spectrum. In particular, cooperative spectrum sensing (CSS) determines the state of primary users (PUs) by cooperating with multiple secondary users (SUs) distributed around a Cognitive Radio Network (CRN), further overcoming various noise and fading issues in the radio environment. But it’s still challenging to balance energy efficiency and good sensing performances in the existing CSS system, especially when the CRN consists of battery-limited sensors. This article investigates the application of machine learning technologies for cooperative spectrum sensing, especially through solving a multi-dimensional optimization that cannot be readily addressed by traditional approaches. Specifically, we develop a neural network, which involves parameters that are integral to the CSS performance, including a device sleeping rate for each sensor and thresholds used in the energy detection method, and a customized loss function based on the energy consumption of the CSS system and multiple penalty terms reflecting the system requirements. Using this formulation, energy consumption is to be minimized with the guarantee of reaching a certain probability of false alarm and detection in the CSS system. With the proposed method, comparison studies under different hard fusion rules (‘OR’ and ‘AND’) demonstrate its effectiveness in improving the CSS system performances, as well as its robustness in the face of changing global requirements. This paper also suggests the combination of the traditional and the proposed scheme to circumvent the respective inherent pitfalls of neural networks and the traditional semi-analytic methods.