Created
February 26, 2017 14:44
-
-
Save arynas/0f2a9b4ccd389db1c76877fd85a95dce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
class TextCNN(object): | |
""" | |
A CNN for text classification. | |
Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. | |
""" | |
def __init__( | |
self, sequence_length, num_classes, vocab_size, | |
embedding_size, filter_sizes, num_filters): | |
# Implementation... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment