I want to check the results of AdaptiveAvgPool2d.
I built a simple test:

import torch
import torch.nn as nn
total = 256 * 500 * 4 * 4
x     = torch.arange(0, total).view(256, 500, 4, 4).float()
p     = nn.AdaptiveAvgPool2d(1),
res   = p(x)

I’m getting error:

—> 7 res   = p(x)
TypeError: ‘tuple’ object is not callable


Why I’m getting this error ?
How can I run AdaptiveAvgPool2d on my created tensor and check the results ?