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?
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?