I am trying to build a CLDNN that is researched in the paper here
After the convolutional layers, the features go through a dim-reduction layer. At the point when the features leave the conv layers, the dimensions are [?, N, M]
. N represents the number of windows and I think the network requires the reduction in the dimension M, so the dimensions of the features after the dim-red layer is [?,N,Q]
, where Q < M
.
I have two questions.
How do I do this in TensorFlow? I tried using a weight with
W = tf.Variable( tf.truncated_normal([M,Q],stddev=0.1) )
I thought the multiplication of
tf.matmul(x,W)
would yield[?, N, Q]
but[?, N, M]
and[M, Q]
are not valid dimensions for multiplication. I would like to keep N constant and reduce the dimension of M.What kind of non-linearity should I apply to the outcome of
tf.matmul(x,W)
? I was thinking about using a ReLU but I couldn't even get #1 done.