-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class #15
Comments
Author, there is this problem at present, I don't know how to solve it, the situation is urgent, thank you!! |
Author, could you spare me a moment? Could you help me with the question I had two days ago? Thank you |
Hi @luocmin , please pull the latest version. Let me know if this doesn't answer your questions: (1) You're right that (2) (3) Please pull in the latest (4) I didn't catch how you are doing the dataset to GPU mapping, could you explain in more detail here? If you are limited by GPU RAM, you could also |
@johnwlambert Hi, 2、In addition, I modified some of the code in the MSEg-3m.YAMl file, |
Hi @luocmin, there is no compilation involved in our repo since all files are pure Python or bash. Our configuration is to use 7 processes. Each process processes one dataset mseg-semantic/mseg_semantic/tool/train.py Line 537 in f8afb3c
The gpu index (0,1,2...,6) is the def get_rank_to_dataset_map(args) -> Dict[int,str]:
"""
Obtain a mapping from GPU rank (index) to the name of the dataset residing on this GPU.
Args:
- args
Returns:
- rank_to_dataset_map
"""
rank_to_dataset_map = {}
for dataset, gpu_idxs in args.dataset_gpu_mapping.items():
for gpu_idx in gpu_idxs:
rank_to_dataset_map[gpu_idx] = dataset
print('Rank to dataset map: ', rank_to_dataset_map)
return rank_to_dataset_map
args.dataset_name = rank_to_dataset_map[args.rank]
...
train_data = dataset.SemData(split='train', data_root=args.data_root[args.dataset_name], data_list=args.train_list[args.dataset_name], transform=train_transform)
...
train_loader = torch.utils.data.DataLoader(train_data, batch_size=args.batch_size, shuffle=(train_sampler is None), num_workers=args.workers, pin_memory=True, sampler=train_sampler, drop_last=True) See here Changing our config by mapping each dataset to the same GPU will mean that only one dataset is trained (the last one to hit line 394 mseg-semantic/mseg_semantic/tool/train.py Line 394 in f8afb3c
You will need a different strategy about how to use fewer GPUs. I mentioned a few already (concatenating all image IDs into a single dataset, which could be sharded across 4 gpus, or instead you could accumulate gradients in place over 2 forward and backward passes, and then perform a single gradient update). |
Thank you, but being white I won't change the dataloader code for now |
There's a little bit of an error with the class.
I changed one line of code to change args.tc.classes to args.tc.num_uclasses as shown below.
The text was updated successfully, but these errors were encountered: