1安装torch
2下载文件报错,由于网络问题,图像数据文件建立了,但是内容没有下载下来,改为直接拷贝到目标目录
3tpj.py
line249 for batch, (image, label) in enumerate(train_loader):
报错AttributeError: module ‘main’ has no attribute ‘spec’
尝试修改run->configuration per file
spawn.py(173)get_preparation_data()
171 # or through direct execution (or to leave it alone entirely)
172 main_module = sys.modules[‘main’]
–> 173 main_mod_name = getattr(main_module.spec, “name”, None)
174 if main_mod_name is not None:
175 d[‘init_main_from_name’] = main_mod_name
C:\Users\sun\AppData\Local\conda\conda\envs\tensorflow\Lib\multiprocessing
改成
main_module.spec=None
4
File “C:\Users\sun\AppData\Local\conda\conda\envs\tensorflow\lib\site-packages\torch\nn\functional.py”, line 1623, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: $ Torch: not enough memory: you tried to allocate 0GB. Buy new RAM! at …\aten\src\TH\THGeneral.cpp:201