diff --git a/x_ksh/SA_cnn_ps3.py b/x_ksh/SA_cnn_ps3.py index 3c308b8..de5dc55 100644 --- a/x_ksh/SA_cnn_ps3.py +++ b/x_ksh/SA_cnn_ps3.py @@ -39,32 +39,32 @@ p_keep_hidden = tf.placeholder(tf.float32, name="p_keep_hidden") # L1 SoundIn shape=(?, 20, 100, 1) -W1 = tf.get_variable("W1", shape=[2, 2, 1, 32],initializer=tf.contrib.layers.xavier_initializer()) +W1 = tf.get_variable("W1", shape=[2, 10, 1, 32],initializer=tf.contrib.layers.xavier_initializer()) L1 = tf.nn.conv2d(X_sound, W1, strides=[1, 1, 1, 1], padding='SAME') L1 = tf.nn.elu(L1) -L1 = tf.nn.max_pool(L1, ksize=[1, 2, 2, 1],strides=[1, 2, 2, 1], padding='SAME') +L1 = tf.nn.max_pool(L1, ksize=[1, 3, 3, 1],strides=[1, 3, 3, 1], padding='SAME') L1 = tf.nn.dropout(L1, p_keep_conv) -# L2 Input shape=(?,10,50,32) -W2 = tf.get_variable("W2", shape=[2, 2, 32, 64],initializer=tf.contrib.layers.xavier_initializer()) +# L2 Input shape=(?,7,34,32) +W2 = tf.get_variable("W2", shape=[2, 10, 32, 64],initializer=tf.contrib.layers.xavier_initializer()) L2 = tf.nn.conv2d(L1, W2, strides=[1, 1, 1, 1], padding='SAME') L2 = tf.nn.elu(L2) -L2 = tf.nn.max_pool(L2, ksize=[1, 2, 2, 1],strides=[1, 2, 2, 1], padding='SAME') +L2 = tf.nn.max_pool(L2, ksize=[1, 3, 3, 1],strides=[1, 3, 3, 1], padding='SAME') L2 = tf.nn.dropout(L2, p_keep_conv) -# L3 Input shape=(?,5,25,64) -W3 = tf.get_variable("W3", shape=[2, 2, 64, 128],initializer=tf.contrib.layers.xavier_initializer()) +# L3 Input shape=(?,3,12,64) +W3 = tf.get_variable("W3", shape=[2, 10, 64, 128],initializer=tf.contrib.layers.xavier_initializer()) L3 = tf.nn.conv2d(L2, W3, strides=[1, 1, 1, 1], padding='SAME') L3 = tf.nn.elu(L3) -L3 = tf.nn.max_pool(L3, ksize=[1, 2, 2, 1],strides=[1, 2, 2, 1], padding='SAME') +L3 = tf.nn.max_pool(L3, ksize=[1, 3, 3, 1],strides=[1, 3, 3, 1], padding='SAME') L3 = tf.nn.dropout(L3, p_keep_conv) -L3_flat= tf.reshape(L3, shape=[-1, 3*13*128]) +L3_flat= tf.reshape(L3, shape=[-1, 4*128]) # Final FC 2*3*128 inputs -> 41 outputs -W4 = tf.get_variable("W4", shape=[3*13*128, 615],initializer=tf.contrib.layers.xavier_initializer()) +W4 = tf.get_variable("W4", shape=[4*128, 512],initializer=tf.contrib.layers.xavier_initializer()) L4 = tf.nn.elu(tf.matmul(L3_flat, W4)) L4 = tf.nn.dropout(L4, p_keep_hidden) -W_o = tf.get_variable("W_o", shape=[615,41],initializer=tf.contrib.layers.xavier_initializer()) +W_o = tf.get_variable("W_o", shape=[512,41],initializer=tf.contrib.layers.xavier_initializer()) b = tf.Variable(tf.random_normal([41])) logits = tf.matmul(L4, W_o) + b @@ -111,13 +111,15 @@ 3) con2d layer * 3 + FC lr=0.0002, epoch = 300 p_keep_conv, p_keep_hidden = 0.8, 0.7 +win : (2, 10), (2,2), (2,2) +max_pool : (2,5), (3,3), (3,3) accuracy: 51~60% -4) window를 정사각형 모양으로 바꿈 -lr=0.0002, epoch = 300 -p_keep_conv, p_keep_hidden = 0.8, 0.7 +4) 3에서 윈도우 조절 win : (2, 10), (2,4), (2,3) max_pool : (2,5), (3,3), (3,3) accuracy: 53~65% - - +5) 3에서 윈도우 조절2 +win : (2, 10), (2,10), (2,10) +max_pool : (3,3), (3,3), (3,3) + """ \ No newline at end of file