Closed Nakupenda-7 closed 3 years ago
the error is ModuleNotFoundError: No module named 'torch'
, make sure you have installed pytorch and import it.
the error is
ModuleNotFoundError: No module named 'torch'
, make sure you have installed pytorch and import it.
Of course, I configured the pytorch environment and imported pytorch, but this error still occurred!
the error is
ModuleNotFoundError: No module named 'torch'
, make sure you have installed pytorch and import it.
the correct error is ModuleNotFoundError: No module named '—torch—'
The configuration is the same environment Loading Backbone Checkpoint './model/EfficientNet-b0/model/Epoch_36_Time_2021-01-07-00-31_checkpoint.pth' Traceback (most recent call last): File "train.py", line 370, in
main()
File "train.py", line 44, in main
mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, cfg, val_dataset))
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 171, in spawn
while not spawn_context.join():
File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 118, in join
raise Exception(msg)
Exception:
-- Process 0 terminated with the following error: Traceback (most recent call last): File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, *args) File "/mnt/cavaface.pytorch/train.py", line 222, in main_worker backbone.load_state_dict(torch.load(BACKBONE_RESUME_ROOT, map_location=loc)) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/serialization.py", line 528, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/root/miniconda3/envs/myconda/lib/python3.7/site-packages/torch/serialization.py", line 782, in _load result = unpickler.load() ModuleNotFoundError: No module named 'torch'