@barendale  you are using fully connected layers that is the reason your network requires a lot of memory the two things you can do is reduce the fully connect nodes in the linear function in the model and also try reducing the batch size if the you need to retain the same model