Hi!
I’m having some trouble wrapping my head around the reshaper function.
X has dimensions (m,Tx,n_values) and x is (:,t,: ) .
Wouldn’t that make x a 2D slice? How is it that we are able to reshape x into a (n_values,) array? Shouldn’t it be (m*n_values,) if anything?
Cheers.
2 Likes
Hi,
When we construct a graph model, we’ve no idea how many batch size (m) data will be fed during training time. Therefore, if you print out model summary, you’ll see the fist dimension of each layer in/out shapes are None
. In the same reason, the shape parameter in layer object (like Dense, Reshape) won’t specify batch size, b/c it’s unknown.
So, in the case, the output tensor of Reshape((1, n_values))
has shape (None, 1, n_values)
3 Likes