icoz69 / CaNet

The code for paper "CANet: Class-Agnostic Segmentation Networks with Iterative Refinement and Attentive Few-Shot Learning"
190 stars 32 forks source link

Some questions about the code #7

Open zhukaii opened 5 years ago

zhukaii commented 5 years ago

Error when the code runs to ‘turn off’ function, should model.module be modified to the model? The pytorch model does not seem to have the '.module' attribute, only the '.modules'.

LinglanZhao commented 4 years ago

https://github.com/icoz69/CaNet/blob/fdce9462d03ff93bc11f4795df94fbbf60b1c8ca/train.py#L103 Did you comment this line? When single GPU is available, using model=nn.DataParallel(model,[0]) may fix this problem.

Temiloluwa commented 3 years ago

0 and 1 are their GPU devices. If you have just one device, [0] will work as you described.