gll89的个人博客分享 http://blog.sciencenet.cn/u/gll89

博文

[转载]adaptive pooling

已有 3683 次阅读 2019-5-26 13:45 |个人分类:DeepLearning|系统分类:科研笔记|文章来源:转载

  • torch.nn.AdaptiveAvgPool3d(output_size)[SOURCE]

  • Applies a 3D adaptive average pooling over an input signal composed of several input planes.

    The output is of size D x H x W, for any input size. The number of output features is equal to the number of input planes.

https://pytorch.org/docs/stable/nn.html?highlight=adaptive_avg_pool2d#torch.nn.AdaptiveAvgPool3d


you can use adaptive_avg_pool2d 390 to achieve global average pooling, just set the output size to (1, 1),

import torch.nn.functional as F x = F.adaptive_avg_pool2d(x, (1, 1))

https://discuss.pytorch.org/t/global-average-pooling-in-pytorch/6721/9



https://blog.sciencenet.cn/blog-1969089-1181263.html

上一篇:[转载]DICOM Processing and Segmentation in Python
下一篇:Install Pytorch on Ubuntu
收藏 IP: 60.191.2.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 14:53

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部