We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
我运行时也遇到了同样的错误,简单排查发现可能是因为可变参数没有取出. 在models/model_zoo.py 第77行get_model()函数中,传入的参数只取出的了name,剩下的所有参数(包括local_rank)都传入到models中了. 解决:针对我的实验(deeplabv3),只需要将models/deeplabv3.py中第139行get_deeplabv3函数改一下,给它添加关键字local_rank,然后使用local_rank时再改一下. ` def get_deeplabv3(dataset='pascal_voc', backbone='resnet50', pretrained=False, root='~/.torch/models',pretrained_base=True, local_rank=0, **kwargs): #添加local_rank关键字
device = torch.device(kwargs['local_rank']) #这是源代码 device = torch.device(local_rank) #这是我改的代码
` 如果实验使用其他的模型,就改对应模型中这个函数的代码即可
Sorry, something went wrong.
我运行时也遇到了同样的错误,简单排查发现可能是因为可变参数没有取出. 在models/model_zoo.py 第77行get_model()函数中,传入的参数只取出的了name,剩下的所有参数(包括local_rank)都传入到models中了. 解决:针对我的实验(deeplabv3),只需要将models/deeplabv3.py中第139行get_deeplabv3函数改一下,给它添加关键字local_rank,然后使用local_rank时再改一下. ` def get_deeplabv3(dataset='pascal_voc', backbone='resnet50', pretrained=False, root='~/.torch/models',pretrained_base=True, local_rank=0, **kwargs): #添加local_rank关键字 device = torch.device(kwargs['local_rank']) #这是源代码 device = torch.device(local_rank) #这是我改的代码 ` 如果实验使用其他的模型,就改对应模型中这个函数的代码即可
Thank you,it worked!
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: