Multiple sclerosis (MS) and neuromyelitis optica spectrum disorders (NMOSD) are both neuroinflammatory diseases and have overlapping clinical manifestations. We developed a convolutional neural network that differentiates between MS and NMOSD based on multi-dynamic multi-echo sequence that measures R1 and R2 relaxation times and proton density. To avoid overfitting on a small dataset, we aimed to separate features of images into those specific to an image and those common to the group (i.e. MS or NMOSD) based on SqueezeNet. We used only common features for classification. Our model achieved a diagnostic accuracy of 80.7%.