loss=F.cross_entropy(output,image)
When I use the loss function cross_entropy, there is a erro:
Traceback (most recent call last):
**  File “cnn.py”, line 131, in **
**    optimizer.step()**
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1512386481460/work/torch/lib/THC/generated/…/generic/THCTensorMathPointwise.cu:301
I add a sigmoid function before the net output,that can correctly run.But my input value is not only 0~1 , I use autoencoder,so I think  the output by add sigmoid is not close the input
Why? How can I correctly use the cross_entropy?