INNER CODE UNIT · Python

main

OpenMeshLab/MeshXL · main.py:141

def main(args):
    
    np.random.seed(args.seed)
    torch.cuda.manual_seed_all(args.seed)
    
    if args.checkpoint_dir is not None:
        pass
    elif args.test_ckpt is not None:
        # if not define the checkpoint-dir, set to the test checkpoint folder as default
        args.checkpoint_dir = os.path.dirname(args.test_ckpt)
        print(f'testing directory: {args.checkpoint_dir}')
    else:
        raise AssertionError(
            'Either checkpoint_dir or test_ckpt should be presented!'
        )
    
    os.makedirs(args.checkpoint_dir, exist_ok=True)
    accelerator = Accelerator()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…