2020年11月27日

tensor 类型转换

摘要: 在Tensor后加 .long(), .int(), .float(), .double()等即可,也可以用.to()函数进行转换,所有的Tensor类型可参考https://pytorch.org/docs/stable/tensors.html import torch a = torch.Do 阅读全文

posted @ 2020-11-27 19:48 cltt 阅读(1567) 评论(0) 推荐(0) 编辑

导航