Assume the tensor_x is the tensor tensor([0.9546]) u got, and x is the value 0.9546 u want.  Each way of tensor_x.item() and (float)(tensor_x.cpu().detach().numpy()) and (float)(tensor_x.data.cpu().numpy()[0]) can solve ur problem.