INNER CODE UNIT · Python

model_baseline

adobe/antialiased-cnns · main.py:231

        model_baseline = models.__dict__[args.arch[:-5]](pretrained=True)
        antialiased_cnns.copy_params_buffers(model_baseline, model)

    if args.weights is not None:
        print("=> using saved weights [%s]"%args.weights)
        weights = torch.load(args.weights)
        model.load_state_dict(weights['state_dict'])

    if args.distributed:
        # For multiprocessing distributed, DistributedDataParallel constructor
        # should always set the single device scope, otherwise,
        # DistributedDataParallel will use all available devices.
        if args.gpu is not None:
            torch.cuda.set_device(args.gpu)
            model.cuda(args.gpu)
            # When using a single GPU per process and per
            # DistributedDataParallel, we need to divide the batch size
            # ourselves based on the total number of GPUs we have

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…