# NOT RUN {
if (torch_is_installed()) {
# pool of square window of size=3, stride=2
m = nn_avg_pool3d(3, stride=2)
# pool of non-square window
m = nn_avg_pool3d(c(3, 2, 2), stride=c(2, 1, 2))
input = torch_randn(20, 16, 50,44, 31)
output = m(input)
}
# }
Run the code above in your browser using DataLab