Skip to content

AttributeError: 'DataParallel' object has no attribute 'train_model' #2

@sxhxliang

Description

@sxhxliang

Thank for your implementation, but I got an error when using 4 GPUs to train this model

# model = torch.nn.DataParallel(model, device_ids=[0,1,2,3])
Traceback (most recent call last):
File "bdd_coco.py", line 567, in
model.train_model(dataset_train, dataset_val,
File "/home/user/.conda/envs/pytorch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 532, in getattr
type(self).name, name))
AttributeError: 'DataParallel' object has no attribute 'train_model'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions