2020
09-29
09-29
基于Tensorflow一维卷积用法详解
我就废话不多说了,大家还是直接看代码吧!importtensorflowastfimportnumpyasnpinput=tf.constant(1,shape=(64,10,1),dtype=tf.float32,name='input')#shape=(batch,in_width,in_channels)w=tf.constant(3,shape=(3,1,32),dtype=tf.float32,name='w')#shape=(filter_width,in_channels,out_channels)conv1=tf.nn.conv1d(input,w,2,'VALID')#2为步长print(conv1.shape)#宽度计算(width-kernel_size+1)/strides,(10-3...
继续阅读 >