facebookresearch / deepmask

Torch implementation of DeepMask and SharpMask
Other
3.11k stars 507 forks source link

Passing -np 1 (number of proposal) causes an error #109

Closed jinsu35 closed 7 years ago

jinsu35 commented 7 years ago

An error occurs in line 295 in InferSharpMask.lua. Oddly the dimension of mask was reduced to 1. Can someone explain how to resolve this issue?

JK

jinsu35 commented 7 years ago

I figured out. In line 153, change self.topMasks0 = topMasks0:float():squeeze() into self.topMasks0 = topMasks0:float():squeeze(2)

By default squeeze() removes all singleton dimensions whereas we only to remove only the second.