小编H.H*_*H.H的帖子

1D卷积层后的最大池化层

我是Tensorflow的新手.我正在尝试在1D卷积层之后添加最大池池:

import tensorflow as tf
import math
sess = tf.InteractiveSession()

length=458
# These will be inputs
## Input pixels, image with one channel (gray)
x = tf.placeholder("float", [None, length])
# Note that -1 is for reshaping
x_im = tf.reshape(x, [-1,length,1])
## Known labels
# None works during variable creation to be
# unspecified size
y_ = tf.placeholder("float", [None,2])

# Conv layer 1
num_filters1 = 2
winx1 = 3
W1 = tf.Variable(tf.truncated_normal(
    [winx1, 1 , num_filters1],
    stddev=1./math.sqrt(winx1)))
b1 = tf.Variable(tf.constant(0.1,
                shape=[num_filters1])) …
Run Code Online (Sandbox Code Playgroud)

python machine-learning conv-neural-network tensorflow max-pooling

1
推荐指数
1
解决办法
1496
查看次数