Reputation: 276
Before building a DNN model, I need to have the product of two matrixes: [None, 32, 32]
and [32, 32]
Since I know that this method works (from the example of MNIST
)
x = tf.placeholder("float", shape=[None, 784])
W = tf.Variable(tf.zeros([784,10]))
l = tf.matmul(x, W)
I try this one on my question
x = tf.placeholder(tf.float32, shape = [None, 64, 64])
w = t.Variable(tf.random_normal([64, 64], 0, 0.3))
l = tf.matmul(x, w)
But it is wrong.
--
I know that if w = t.Variable(tf.random_normal([constant, 64, 64], 0, 0.3))
, this product could work. But I need the w
to be the two-dimension matrix [64, 64]
.
Could I have one method that makes this product between [None, 32, 32]
and [32, 32]
successful?
Upvotes: 1
Views: 87