shape of theano tensor variable out of keras Conv2D
Being new to theano, pls bear with me. I thought the shape of the tensor variable is already well defined out of the Conv2D layer since the input is specified, as follow,
from keras.layers import Input, Convolution2D
import theano
input_img = Input(shape=(1, 28, 28))
x = Convolution2D(16, 3, 3, activation='relu', border_mode='same') (input_img)
print type(x)
print theano.tensor.shape(x)
But the output is,
class 'theano.tensor.var.TensorVariable'
Shape.0
Since I'm taking the default stride of 1, and same
border mode here means that padding is added so the output is the same as input. Using this information I could calculate by hand what the output shape should be.
Did I miss something here? The question is how to get the shape of the output of a convolution layer?
Topic keras convolutional-neural-network theano
Category Data Science