xuebinqin / BASNet

Code for CVPR 2019 paper. BASNet: Boundary-Aware Salient Object Detection
MIT License
1.35k stars 249 forks source link

upsample functions函数使用问题 #40

Open tongxiaozhong14 opened 4 years ago

tongxiaozhong14 commented 4 years ago

Thank you for your answer, but how should this be used? I didn’t find any specific application in your U_2 code

xuebinqin commented 4 years ago

The function is defined in "U-2-Net/model/u2net.py" line 21:


upsample tensor 'src' to have the same spatial size with tensor 'tar'

def _upsample_like(src,tar):

src = F.upsample(src,size=tar.shape[2:],mode='bilinear')

return src

It is used start from line 88: hx6dup = _upsample_like(hx6d,hx5), which upsamples tensor hx6d to the same spatial size (h,w) of hx5, the batch_size and the channel numbers are kept the same.

On Jun 20, 2020, at 8:31 AM, tongxiaozhong14 notifications@github.com wrote:

Thank you for your answer, but how should this be used? I didn’t find any specific application in your U_2 code

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.