dennybritz / cnn-text-classification-tf

Convolutional Neural Network for Text Classification in Tensorflow
Apache License 2.0
5.64k stars 2.77k forks source link

What is the size of embedded_chars_expanded ? #186

Open arushi-08 opened 4 years ago

arushi-08 commented 4 years ago

I'm trying to perform text classification using cnn, on my dataset, where embedding size is (?,768). I'm following this file text_cnn.py, from conv2d function. But before that, I need to convert my embedding into 4D tensor. How should I change (?,768) to 4D tensor?

In text_cnn.py : self.embedded_chars = tf.nn.embedding_lookup(self.W, self.input_x) self.embedded_chars_expanded = tf.expand_dims(self.embedded_chars, -1)

What are the dimensions of embedded_chars_expanded?