guoswang opened a new issue #10521: How can I get the output of the net's last 
layer- symbol.LinearRegressionOutput?
URL: https://github.com/apache/incubator-mxnet/issues/10521
 
 
   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.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to