masahi commented on a change in pull request #5075: [Torch] Add initial 3D op
support and test on Resnet 3D
URL: https://github.com/apache/incubator-tvm/pull/5075#discussion_r393317483
##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -708,6 +701,31 @@ def forward(self, x):
verify_model(ToInt().eval(), torch.tensor(2.0))
+def test_adaptive_pool3d():
+ inp = torch.rand((1, 32, 16, 16, 16))
+ verify_model(torch.nn.AdaptiveMaxPool3d((1, 1, 1)).eval(), inp)
+ verify_model(torch.nn.AdaptiveMaxPool3d((2, 2, 2)).eval(), inp)
+ verify_model(torch.nn.AdaptiveAvgPool3d((1, 1, 1)).eval(), inp)
+ verify_model(torch.nn.AdaptiveAvgPool3d((2, 2, 2)).eval(), inp)
+ verify_model(torch.nn.AdaptiveAvgPool3d((4, 8, 8)).eval(), inp)
+ verify_model(torch.nn.AdaptiveMaxPool3d((7, 8, 9)).eval(), inp)
Review comment:
Added two more input shapes. Since video use case seems to be more common,
the new input shape has the depth dimension different than height/width.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services