HRNet-Semantic-Segmentation
HRNet-Semantic-Segmentation copied to clipboard
how to solve this problem ?Traceback (most recent call last): File "tools/train.py", line 287, in <module> main() File "tools/train.py", line 229, in main model.module.load_state_dict(checkpoint['state_dict']) File "/home/wrc/anaconda3/envs/HRNet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 539, in __getattr__ type(self).__name__, name)) AttributeError: 'FullModel' object has no attribute 'module'
have you solved the problem? I met the same trouble
have you solved the problem? I met the same trouble
maybe conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
def is_parallel(model): return type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel) msd = model.module.state_dict() if is_parallel(model) else model.state_dict() # model state_dict
python -m torch.distributed.launch --nproc_per_node=2 tools/train.py
它是多卡默认,但是你是单卡在跑,所以报错了 It is multi-card default, but you are running with a single card, so an error is reported
它是多卡默认,但是你是单卡在跑,所以报错了 It is multi-card default, but you are running with a single card, so an error is reported
大佬,我只有一张卡,要怎么修改知道吗
have you solved the problem? I met the same trouble
have you solved the problem?
所以说应该怎么改成单卡呢