尝试使用junyanz / pytorch-CycleGAN-and-pix2pix时,WSL出现错误。
我使用Windows 10上PyTORCH上的步骤成功完成了Windows 10 x64上的所有安装步骤:带有屏幕截图的说明,然后是具有GitHub桌面的Windows版Ubuntu for Windows 如何在Windows 10上安装和使用Linux Bash Shell。
但是我被最新的步骤挡住了。
这是我尝试在Windows中下载或训练模型的地方。例如,使用Ubuntu Linux提示符,我手动导航到适当的位置,然后键入以下命令,如下所示(我也尝试过su模式)
bash pretrained_models/download_pix2pix_model.sh facades_label2photo
我立即得到一个错误,总是一样,类似于以下内容:
root@Azure:/mnt/c/Users/vincent/Downloads/vision/pytorch-CycleGAN-and-pix2pix# bash pretrained_models/download_pix2pix_model.sh facades_label2photo
pretrained_models/download_pix2pix_model.sh: line 2: $'\r': command not found
Note: available models are edges2shoes, sat2map, and facades_label2photo
pretrained_models/download_pix2pix_model.sh: line 4: $'\r': command not found
]pecified [facades_label2photo
pretrained_models/download_pix2pix_model.sh: line 6: $'\r': command not found
mkdir: cannot create directory ‘./checkpoints/facades_label2photo\r_pretrained\r’: No such file or directory
pretrained_models/download_pix2pix_model.sh: line 10: $'\r': command not found
WARNING: timestamping does nothing in combination with -O. See the manual
for details.
: No such file or directoryhphoto
pretrained_models/download_pix2pix_model.sh: line 12: $'\r': command not found
pretrained_models/download_pix2pix_model.sh: line 13: $'\r': command not found
任何的想法?
pretrained_models/download_pix2pix_model.sh
git clone
,而不要花费额外的精力尝试转换每个文件。如果目标是在Ubuntu中安装软件,则没有理由先在文件系统外下载软件。
$'\r': command not found
强烈建议这个问题是您使用的Windows文本编辑器使用DOS风格的CRLF行尾保存了文件-例如,参见DOS vs. Unix Line