TIO-IKIM / CellViT

CellViT: Vision Transformers for Precise Cell Segmentation and Classification
https://doi.org/10.1016/j.media.2024.103143
Other
189 stars 27 forks source link

Running on multiple gpus #11

Closed Xujingkk closed 11 months ago

Xujingkk commented 1 year ago

I'm very interested in your research. Constrained by gpu resources, I want to run code in parallel on multiple gpu cards. I added "model = nn.DataParallel(model, device_ids=[0, 1])" but it didn't work and I got the following error. I have made multiple attempts but haven't solved it yet and would appreciate your help! Also the paper mentions three-fold cross validation, is it using three folds of the original pannuke dataset for the training set, validation set and test set respectively? In the original pannuke dataset, Fold 1 contains 2,657 images, Fold 2 contains 2,524 images and Fold 3 contains 2,723 images. In that case, if the second fold is used for the training set, then the training set will be less than the validation set and the test set, will this have no effect on the results? Maybe my interpretation is wrong, please correct me. 0da268766aece4450cf4b5c3a80fef8

FabianHoerst commented 1 year ago

Have you tried running it on one GPU with smaller batch size to check of the error occurs when running without data parallel?

Sure the folds should have an effect, but the results are averaged in the paper. For the final models we published on Drive, we performed training on all 3 folds.