In this project we analyse the optical and structural properties of galaxies with redshifts (0.5 < z < 3.0) and more massive than 109 solar masses in the IllustrisTNG50 cosmological simulation. We use a Convolutional Neural Network (CNN) trained on observed galaxies from the CANDELS survey. We include similar PSF and noise to the 11048 mock images to match the CANDELS galaxies as closely as possible, after which they were processed through the trained CNN to be classified into one of 5 morphologies (spheroidal, disks, irregulars, irregular disks, and spheroidal disks). We find that, overall, the simulations properly reproduce the observed evolution of galaxy morphologies, although they tend to under predict the abundance of pure spheroids. In addition, the mass-size relations of the simulated galaxies divided into morphological types reproduce the trends and slopes seen in the observed galaxies well.