I was wondering how to make a 5D tensor in Theano.
Specifically, I tried dtensor = T.TensorType('float32', (False,)*5). However, the only issue is that dtensor.shapereturns: AttributeError: 'TensorType' object has no attribute 'shape'
Whereas if I used a standard tensor type likedtensor = T.tensor3('float32'), I don't get this issue when I call dtensor.shape.
Is there a way to have this not be an issue with a 5D tensor in Theano?
Theano variables do not have explicit shape information since they are symbolic variables, not numerical. Even
dtensor3 = T.tensor3(T.config.floatX)does not have an explicit shape. When you typedtensor3.shapeyou'll get an objectShape.0but when you dodtensor3.shape.eval()to get its value you'll get an error.For both cases however,
dtensor.ndimworks and prints out5and3respectively.