
错误处理
Growing Sea
这个作者很懒,什么都没留下…
展开
-
‘lengths‘ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor
今天在用pytorch训练模型遇到一个错误:RuntimeError: ‘lengths’ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor解决:参考https://github.com/pytorch/pytorch/releasesinp = torch.rand(10, 2, 3, device=“cuda”)lengths = torch.tensor([10, 7], device=“cu原创 2021-01-05 17:17:44 · 4692 阅读 · 4 评论 -
处理错误:Instructions for updating: To construct input pipelines, use the `tf.data` module.
首先找到对应的错误代码:C:\Users\admin\PycharmProjects\untitled3\mnist_generateds.py:56: string_input_producer (from tensorflow.python.training.input) is deprecated and will be removed in a future version.Instr...原创 2019-04-20 00:20:08 · 10681 阅读 · 1 评论