# NOT RUN {
if (torch_is_installed()) {
# pool of cubic window of size=3, and target output size 13x12x11
m = nn_fractional_max_pool3d(3, output_size=c(13, 12, 11))
# pool of cubic window and target output size being half of input size
m = nn_fractional_max_pool3d(3, output_ratio=c(0.5, 0.5, 0.5))
input = torch_randn(20, 16, 50, 32, 16)
output = m(input)
}
# }
Run the code above in your browser using DataLab