Closed yueyinqiu closed 7 months ago
Thank you for reporting! The discrepancy between PyTorch and TorchSharp is the default value assigned to the stride
parameter. I submitted a fix for the next version, but until then you can just specify the stride
parameter to be the same as the kernelSize
parameter to get the desired results.
E.g.,
var y1 = torch.nn.functional.avg_pool1d(x, 2, 2);
Fixed in v0.102.1.
Hello! I've found that
torch.nn.functional.avg_pool1d
is not working as expected.Here is my test code:
And in PyTorch:
There seems to be something going wrong with
torch.nn.functional.avg_pool1d
, whiletorch.nn.AvgPool1d
still works well.