kaixin96 / PANet

Code for our ICCV 2019 paper PANet: Few-Shot Image Semantic Segmentation with Prototype Alignment
322 stars 64 forks source link

mutli-GPU training #25

Closed qiulesun closed 4 years ago

qiulesun commented 4 years ago

@kaixin96 How can I run your code with two GPU cards when the batch_size is set to 4 for fast training ? Could you provide the corresponding modifications and run command ?

kaixin96 commented 4 years ago

Hi @qiulesun, sorry for the late reply. You can set batchsize to 4 in https://github.com/kaixin96/PANet/blob/master/train.py#L68. Note that in this case the loss is aggregated from 4 different episodes, which will probably improve the performance.

Hope this helps. Thank you.

kaixin96 commented 4 years ago

I’m closing this issue because it has been inactive for a while. Feel free to reopen if you have questions. Thank you.

qiulesun commented 4 years ago

@kaixin96 The C-way K-shot setting is same for both training and inference ? For example, the inference stage uses 1-way 5-shot setting, and training stage must use 1-way 5-shot setting and vice versa.

kaixin96 commented 4 years ago

@qiulesun yes, C-way K-shot is same for both training and inference

qiulesun commented 4 years ago

@kaixin96 Table 1 reports results of 1-way 1-shot and 1-way 5-shot segmentation. That means PANet must be trained twice respectively using 1-way 1-shot settting and 1-way 5-shot setting ?

kaixin96 commented 4 years ago

@qiulesun yes, trained twice respectively