如何将[1], type = Float32, device = cpu数据取出来?
将object转为TorchSharp.torch.Tensor
(TorchSharp.torch.Tensor)output
获取第一个元素
((TorchSharp.torch.Tensor)output)[0]
转换为单精度浮点数
((TorchSharp.torch.Tensor)output)[0].ToSingle()
成果!!!!