pytorch conv1d

conv1d从命名就可以看出就是一维卷积,其具体函数接口如下(该内容直接摘自官网):
在这里插入图片描述
在这里插入图片描述

import torch
import torch.nn as nn
m = nn.Conv1d(16,33,3,stride = 2)
input = torch.randn(20,16,50)
output = m(input)
print('output.shape = ',output.shape)

output.shape = torch.Size([20, 33, 24])

从上面理论和程序运行结果可理解如下图:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/pikaqiu_n95/article/details/113922349