Diabetic macular edema (DME) is one of the most common eye complication caused by diabetes mellitus, resulting in partial or total loss of vision. Optical Coherence Tomography (OCT) volumes have been widely used to diagnose different eye diseases, thanks to their sensitivity to represent small amounts of fluid, thickness between layers and swelling. However, the lack of tools for automatic image analysis for supporting disease diagnosis is still a problem. Convolutional neural networks (CNNs) have shown outstanding performance when applied to several medical images analysis tasks. This paper presents a model, OCT-NET, based on a CNN for the automatic classification of OCT volumes. The model was evaluated on a dataset of OCT volumes for DME diagnosis using a leave-one-out cross-validation strategy obtaining an accuracy, sensitivity, and specificity of 93.75%.