juhongm999 / hsnet

Official PyTorch Implementation of Hypercorrelation Squeeze for Few-Shot Segmentation, ICCV 2021
231 stars 43 forks source link

n-shot training #8

Closed MedChebbi closed 3 years ago

MedChebbi commented 3 years ago

Is it possible to train on n-shot > 1? how can that be done? I have noticed that it's only possible in the test script to use more than 1 support image.

juhongm999 commented 3 years ago

Yes, you can simply pass multiple support-query pairs during meta-training stage. Specifically, the model should perform multiple forward passes (given n support images), sum up n losses, and update model parameters with a single backward pass.