First thanks for your reply
I used model = torch.nn.Linear(1,2) instead of model = torch.nn.DataParallel(model, device_ids=self.device_ids) and got this error
Traceback (most recent call last):
  File "train.py", line 43, in <module>
    basic_train.main(cfg, _log)
  File "/home/ubuntu/Rokia/UnRigidFlow-master-2-smooth -attention/basic_train.py", line 49, in main
    train_loader, valid_loader, model, loss, _log, cfg.save_root, cfg.train)
  File "/home/ubuntu/Rokia/UnRigidFlow-master-2-smooth -attention/trainer/kitti_flow_trainer.py", line 13, in __init__
    train_loader, valid_loader, model, loss_func, _log, save_root, config)
  File "/home/ubuntu/Rokia/UnRigidFlow-master-2-smooth -attention/trainer/base_trainer.py", line 28, in __init__
    self.optimizer = self._create_optimizer()
  File "/home/ubuntu/Rokia/UnRigidFlow-master-2-smooth -attention/trainer/base_trainer.py", line 70, in _create_optimizer
    {'params': bias_parameters(self.model.module),
  File "/home/ubuntu/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 539, in __getattr__
    type(self).__name__, name))
AttributeError: 'Linear' object has no attribute 'module'

is this what you have asked me to do?