Accurately separating healthy tissue from tumorous regions is crucial for effective diagnosis and treatment planning based on magnetic resonance imaging (MRI) data. Current manual detection methods rely heavily on human expertise, so MRI-based segmentation is essential to improving diagnostic accuracy and treatment outcomes. The purpose of this paper is to compare the performance of detecting brain tumors from MRI images through segmentation using an unmodified and modified U-Net architecture from deep neural network (DNN) that has been modified by adding batch normalization and dropout on the encoder layer with and without the freeze layer. The study utilizes a public 2D brain tumor dataset containing 3064 T1-weighted contrast-enhanced images of meningioma, glioma, and pituitary tumors. Model performance was evaluated using intersection over union (IoU) and standard metrics such as precision, recall, f1-score, and accuracy across training, validation, and testing stages. Statistical analysis, including ANOVA and Duncan's multiple range test, was conducted to determine the significance of performance differences across the architectures. Results indicate that while the modified architectures show improved stability and convergence, the freeze layer model demonstrated superior IoU and efficiency, making it a promising approach for more accurate and efficient brain tumor segmentation. The comparison of the three methods revealed that the modified UNet architecture with a freeze layer significantly reduced training time by 81.72% compared to the unmodified U-Net while maintaining similar performance across validation and testing stages. All three methods showed comparable accuracy and consistency, with no significant differences in performance during validation and testing.