LoginSignup
0
1

More than 1 year has passed since last update.

【PyTorch】1次元畳み込み層の出力長の計算

Last updated at Posted at 2022-01-20

Conv1dの出力長を計算したい

普通に公式ドキュメントを見れば書いてありますが
https://pytorch.org/docs/1.9.1/generated/torch.nn.Conv1d.html

conv1d.py
def conv1d_outshape(Lin,kernel_size,stride=1,padding=0,dilation=0):
    return ((Lin+2*padding-dilation*(kernel_size-1)-1)/stride)+1
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1