3 ms·
"same" padding for convolutional layers is super convenient too
by SleekEagle 5y ago
"same" padding for convolutional layers is super convenient too
- cinntaile 5y agoYeah true, that's also a bit annoying in PyTorch compared to TF. I remember reading on the PyTorch forums that this was a bit hard to implement for some reason, but I can't recall any details if there were any.
- jbschlosser 5y agoFYI PyTorch now supports "same" padding for convolutions with stride=1; see the docs here: https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.html https://pytorch.org/docs/stable/generated/torch.nn.Conv2d.ht... The stride>1 case has been a bit more controversial within TensorFlow, and there is ongoing discussion on the correct way to implement it within PyTorch on the issue: https://github.com/pytorch/pytorch/issues/3867 https://github.com/pytorch/pytorch/issues/3867
- SleekEagle 5y agoThanks for letting me know!