摘要: def test_onehot(): v = torch.tensor([[0.1, 0.2, 0.7], [0.1, 0.6, 0.3], [0.1, 0.5, 0.4], [0.8, 0.1, 0.1], ]) print('v', v.size(), v) # 按照形状创建全0张量 resul 阅读全文
posted @ 2021-11-22 10:31 太晓 阅读(510) 评论(0) 推荐(0) 编辑