Tensorflow autoencoders with one vector per input neuron
I'm new to tensorflow and Deep neural networks. I'm currently trying to do anomaly detection on trajectories using autoencoders and i'm having an issue with my model.
I'm not able to get the right weight matrix / not sure how to do it.
Here is my model:
Therefore my input data shape is like (336,289,4)
For my weights, i have:
weights = {
'encoder_h1': tf.Variable(tf.random_normal([336, n_hidden_1, 289])),
'encoder_h2': tf.Variable(tf.random_normal([336, n_hidden_2, n_hidden_1])),
'decoder_h1': tf.Variable(tf.random_normal([336, n_hidden_1, n_hidden_2])),
'decoder_h2': tf.Variable(tf.random_normal([336, n_input, n_hidden_1 ])),
}
and my activation function is a sigmoid like
tf.nn.sigmoid(tf.add(tf.matmul(weights['encoder_h1'],x),
biases['encoder_b1'])
But i'm afraid this gives a wheight matrix by trajectory or what i want is a weight matrix for all my trajectories, it should be a 2d tensor but i don't know how to proceed.
I tried many thing such as removing the 336 part from my weight shape but tensorflow says tha its not possible to do matmul on 3d and 2d tensor.
Do you have any idea on how to do?
Thanks in advance for your help
链接地址: http://www.djcxy.com/p/32086.html