Thanks for your reply! According your suggest ,I change the order between nn.DataParallel and load( state_dict).
from
model = LstmAttentionModel()
model.cuda()
model = nn.DataParallel(model)
state_dict = torch.load('a.model')
from collections import OrderedDict
new_state_dict = OrderedDict()
for k, v in state_dict.items():
    if 'module' not in k:
        k = 'module.'+k
    else:
        k = k.replace('features.module.', 'module.features.')
    new_state_dict[k]=v
model.load_state_dict(new_state_dict)

to
model = LstmAttentionModel()
model.cuda()
state_dict = torch.load('a.model')
model.load_state_dict(state_dict)
model = nn.DataParallel(model)

But it get the totally same error