Shortcuts

class torch.nn.AdaptiveMaxPool3d(output_size: Union[T, Tuple[T, ...]], return_indices: bool = False)[source]

Applies a 3D adaptive max 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.

Parameters
• output_size – the target output size of the image of the form D x H x W. Can be a tuple (D, H, W) or a single D for a cube D x D x D. D, H and W can be either a int, or None which means the size will be the same as that of the input.

• return_indices – if True, will return the indices along with the outputs. Useful to pass to nn.MaxUnpool3d. Default: False

Examples

>>> # target output size of 5x7x9
>>> input = torch.randn(1, 64, 8, 9, 10)
>>> output = m(input)
>>> # target output size of 7x7x7 (cube)
>>> input = torch.randn(1, 64, 10, 9, 8)
>>> output = m(input)
>>> # target output size of 7x9x8
>>> m = nn.AdaptiveMaxPool3d((7, None, None))
>>> input = torch.randn(1, 64, 10, 9, 8)
>>> output = m(input) ## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials
{"ft_lang_label":"__label__en","ft_lang_prob":0.6881932,"math_prob":0.95325375,"size":1136,"snap":"2020-45-2020-50","text_gpt3_token_len":364,"char_repetition_ratio":0.16784452,"word_repetition_ratio":0.15196079,"special_character_ratio":0.3415493,"punctuation_ratio":0.19354838,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9752344,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-21T10:18:03Z\",\"WARC-Record-ID\":\"<urn:uuid:20617ea4-5ff9-4289-b23f-1a04e890ab57>\",\"Content-Length\":\"32649\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3a56db2d-7ec3-423f-8d7b-120251e0e0e2>\",\"WARC-Concurrent-To\":\"<urn:uuid:2cefbb50-1719-4ea8-abda-44b4a7b93150>\",\"WARC-IP-Address\":\"185.199.108.153\",\"WARC-Target-URI\":\"https://pytorch.org/docs/master/generated/torch.nn.AdaptiveMaxPool3d.html\",\"WARC-Payload-Digest\":\"sha1:7IE4UFDNW4QGHNCTUVMORUIBZOTHT57E\",\"WARC-Block-Digest\":\"sha1:AY7H2PXMSAVESCFLVN6TWHJ4OSV6VLV3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107876307.21_warc_CC-MAIN-20201021093214-20201021123214-00539.warc.gz\"}"}