Skip to content

Commit

Permalink
make to be clear
Browse files Browse the repository at this point in the history
  • Loading branch information
graykode committed Feb 3, 2019
1 parent 075a7bc commit 8d555d8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions 2-1.TextCNN/TextCNN-Tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
strides=[1, 1, 1, 1],
padding='VALID')
pooled_outputs.append(pooled) # dim of pooled : [batch_size(=6), output_height(=1), output_width(=1), channel(=1)]
print(pooled.shape)

num_filters_total = num_filters * len(filter_sizes)
h_pool = tf.concat(pooled_outputs, num_filters) # h_pool : [batch_size(=6), output_height(=1), output_width(=1), channel(=1) * 3]
Expand All @@ -66,7 +65,6 @@
initializer=tf.contrib.layers.xavier_initializer())
Bias = tf.Variable(tf.constant(0.1, shape=[num_classes]))
model = tf.nn.xw_plus_b(h_pool_flat, Weight, Bias)
print('model ', model.shape)
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(logits=model, labels=Y))
optimizer = tf.train.AdamOptimizer(0.001).minimize(cost)

Expand Down

0 comments on commit 8d555d8

Please sign in to comment.