I saved the file like this
      torch.save(
            state,
            os.path.join(
                args.save_folder,
                args.dataset,
                args.network,
                "checkpoint_{}.pth".format(epoch)))

and the key missing errror is happen with this code
 self.model = EfficientDet(num_classes=args.num_class,
                         network=args.network,
                         W_bifpn=EFFICIENTDET[args.network]['W_bifpn'],
                         D_bifpn=EFFICIENTDET[args.network]['D_bifpn'],
                         D_class=EFFICIENTDET[args.network]['D_class']
                         )

        #self.model = torch.nn.parallel.DistributedDataParallel(self.model, device_ids=[args.gpu],find_unused_parameters=True)
        #self.model =  torch.nn.parallel.DistributedDataParallel(self.model)
        #self.model = torch.nn.parallel.DistributedDataParallel(
        #    self.model, output_device=[1])

        self.model = self.model.cuda()
        if(self.weights is not None):
            print('load state dic...',self.weights)
            checkpoint = torch.load(
                self.weights, map_location=lambda storage, loc: storage)

            #self.model = torch.nn.parallel.DistributedDataParallel(self.model)
            state_dict = checkpoint['state_dict']
            self.model.load_state_dict(state_dict)
            #self.model.module.load_state_dict(state_dict)
        if torch.cuda.is_available():
            self.model = self.model.cuda()
        self.model.eval()

Im not sure how to declare
#self.model = torch.nn.parallel.DistributedDataParallel(self.model, device_ids=[args.gpu],find_unused_parameters=True)
        #self.model =  torch.nn.parallel.DistributedDataParallel(self.model)
        #self.model = torch.nn.parallel.DistributedDataParallel(
        #    self.model, output_device=[1])

to use the model.module
do I need to declare the model has
  #self.model = torch.nn.parallel.DistributedDataParallel(self.model, device_ids=[args.gpu],find_unused_parameters=True)
        #self.model =  torch.nn.parallel.DistributedDataParallel(self.model)
        #self.model = torch.nn.parallel.DistributedDataParallel(
        #    self.model, output_device=[1])

to load the trained DistributedDataParallel model?