class torch.nn.Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True)
in_channels(int) :輸入信號的通道。在文本分類中,即為詞向量的維度
out_channels(int) :卷積產生的通道。有多少個out_channels,就需要多少個1維卷積
kernel_size(int or tuple) :卷積核的尺寸,卷積核的大小為(k,),第二個維度是由in_channels來決定的,所以實際上卷積大小為kernel_size*in_channels
stride(int or tuple, optional) :卷積步長
padding (int or tuple, optional) :輸入的每一條邊補充0的層數
dilation(int or tuple, optional) :卷積核元素之間的間距
groups(int, optional) :從輸入通道到輸出通道的阻塞連接數
bias(bool, optional) :如果bias=True,添加偏置
版權聲明:本文為CSDN博主「若之辰」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/sunny_xsc1994/article/details/82969867
