cpu模式下的pix2pixHD非法指令

2024-04-19 22:01:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在测试pix2pixHD。我没有GPU。我正在使用pytorch==0.4.1。我正在使用以下命令运行cityscape模型的测试:

python test.py --name label2city_1024p --netG local --ngf 32 --gpu_ids -1 --resize_or_crop none

但是我得到了Illegal instruction (core dumped)。我用gdb做了回溯发现:

#0  0x00007fcd623175e6 in THFloatVector_normal_fill_AVX2 () from /home/momen/nvidia_vid2vid/lib/python3.6/site-packages/torch/lib/libcaffe2.so
#1  0x00007fcd621d06f0 in THFloatTensor_normal () from /home/momen/nvidia_vid2vid/lib/python3.6/site-packages/torch/lib/libcaffe2.so
#2  0x00007fcd61c85156 in at::CPUFloatType::normal_(at::Tensor&, double, double, at::Generator*) const ()
   from /home/momen/nvidia_vid2vid/lib/python3.6/site-packages/torch/lib/libcaffe2.so
#3  0x00007fcdb8724895 in torch::autograd::VariableType::normal_ (this=0x27d4fc0, self=..., mean=0, std=0.02, generator=0x0)
at torch/csrc/autograd/generated/VariableType.cpp:10819
#4  0x00007fcdb89e6300 in at::Tensor::normal_ (generator=0x0, std=0.02, mean=0, this=0x7fcd921cc958) at /pytorch/torch/lib/tmp_install/include/ATen/TensorMethods.h:700 

如何解决这个问题?欢迎任何形式的帮助。谢谢。你知道吗

其他信息: 我尝试了py-bt,问题出现在第一层的m.weight.data.normal_(0.0, 0.02)。你知道吗


Tags: infromhomesolibpackagessitetorch