the link to cornernet is:
 GitHub 6

princeton-vl/CornerNet 6
Contribute to princeton-vl/CornerNet development by creating an account on GitHub.
you can find this implementation in CornerNet-master/nnet/py_factory.py
There is part of this code:
class NetworkFactory(object):
def init(self, db):
    super(NetworkFactory, self).__init__()

    module_file = "models.{}".format(system_configs.snapshot_name)
    nnet_module = importlib.import_module(module_file)
    self.model   = DummyModule(nnet_module.model(db))
    self.loss    = nnet_module.loss
    self.network = Network(self.model, self.loss)
  
    self.network = DataParallel(self.network,chunk_sizes=system_configs.chunk_sizes )
    total_params = 0
    for params in self.model.parameters():
        num_params = 1
        for x in params.size():
            num_params *= x                              
        total_params += num_params    
    print("total parameters: {}".format(total_params))
    if system_configs.opt_algo == "adam":
        self.optimizer = torch.optim.Adam(
            filter(lambda p: p.requires_grad, self.model.parameters())