Chinese-Text-Classification icon indicating copy to clipboard operation
Chinese-Text-Classification copied to clipboard

pool2 = nn.MaxPool1d(conved2.shape[2], self.stride)

Open tidalmelon opened this issue 1 year ago • 0 comments

TextCNN的代码实现 池化层的stride可以不写的, 因为只会扫描一次. stride直接设置成默认值也可以. H_out = ([seq_len-kernel_size+1] - [seq_len-kernel_size+1])/)[seq_len-kernel_size+1) +1 = 1 分子是零, stride不重要了

tidalmelon avatar Feb 06 '24 01:02 tidalmelon