Hi,
I tried to get the net loss by add the loss into mx.sym.Group() like this:
density = self.get_Net(data)
Euclidean_loss = mx.sym.LinearRegressionOutput (data = density,label = label,grad_scale = 1/(2.*BATCH_SIZE),name = 'Euclidean_loss')
group = mx.sym.Group([mx.sym.BlockGrad(data = density), Euclidean_loss])
When training the net, I print the ''texec.outputs ‘’ . Then I found that the loss is same as density. I don’t know why ? Can anybody help me? I’m very appreciated it.
Also I tried to make my own loss by using the mx.sym.Makeloss
Euclidean_loss = mx.sym.MakeLoss(mx.sym.square(density - label).sum()/(2.*BATCH_SIZE))
When I training the net again, I got that the prediction is zero? I’m very appreciated it if you can help me.