About 50 million people around the world are affected by epilepsy disorders of different kinds. Any person, of any age, gender, race, or class, may be affected by epilepsy. In addition, epilepsy seizures can also vary in frequency of occurrence. Such seizures sometimes cause cognitive disorders, which may lead to physical injury of the patients. 1 Epilepsy is recognized by the World Health Organization (WHO) as a public health concern because of its physical and psychological consequences. Moreover, epilepsy may lead to premature death, loss of work productivity, and increased healthcare needs and expenditure. 2 For diagnosing epileptic seizures, distinct screening techniques have been developed; including Electroencephalography (EEG), positron emission tomography, magneto encephalography, and magnetic resonance imaging. EEG signals are characterized by being easily acquired with portable devices. 3 EEG can be defined as an electrophysiological exploration method by which electrical activities of the brain are measured using electrodes fixed on the scalp. 4 These electrodes may be bulky for patients. Utilization of EEG signals for diagnosing epilepsy is time-and effort-consuming; as epileptologists have to screen EEG signals minute by minute. Furthermore, human error is inevitable. Hence, a computer-based diagnosis, by which epileptic seizures can be early detected, is expected to help the patients. [5][6][7][8][9] Artificial intelligence covers several areas and includes several branches such as Machine Learning (ML) and Deep Learning (DL).Conventional ML algorithms, including feature extraction and classification, were formerly used before the appearance of DL. Hand-crafted features limit the performance of the classification algorithms, but deep features are preferred due to their better representation of signals and images. Such techniques have achieved great progress, when used in many aspects of medicine, especially in the diagnosis of epileptic seizures. In many fields, such as anomaly detection from medical signals and images, feature learning, target monitoring, and recognition; DL has achieved great advances. [10][11][12] In this paper, we propose an efficient strategy for both seizure detection and prediction from medical EEG signals. Three models are presented for the classification task. Two of them are patient-specific, while the third one is patient non-specific. EEG signals for epilepsy patients can be divided into three states: normal (inter-ictal), ictal (seizure), and pre-ictal which represents the period of 30-60 min before the ictal state. 13 We assumed in this paper that the pre-ictal state occurs 30 min before the ictal state. The two-class classification is implemented between normal and pre-ictal activities for seizure prediction and between normal and ictal activities for seizure detection. A more generalized threeclass classification framework is considered to identify all EEG signal activities. For the first two proposed models, the spectrogram estimation process is performed on EEG si...