TypeError: 'NoneType' object is not callable

Hi all when I use cross-entropy loss loss=self.cross_entropy_loss(embedded_x, target1) I see the error object is not callable. Could anyone help me?

Well you have defined self.cross_entropy_loss in a wrong way. It equals None.