Incorrect number of feature dimensions with VGG + RNN
See original GitHub issueHi,
I just ran into the following problem when trying to train with the VGG convnet (encoder type ‘vggblstmp’).
For an input of size B x T x F, VGG always returns a tensor of size Batch x T/4 x 128. One would assume that the number of feature dimensions for the subsequent RNN should also be 128.
But to determine the number of feature dimensions for the RNN, we call
def get_vgg2l_odim(idim, in_channel=3, out_channel=128):
idim = idim / in_channel
idim = np.ceil(np.array(idim, dtype=np.float32) / 2) # 1st max pooling
idim = np.ceil(np.array(idim, dtype=np.float32) / 2) # 2nd max pooling
return int(idim) * out_channel # numer of channels
which yields F / 4 / in_channel * 128, causing a dimension mismatch. Shouldn’t that method just return the number of filters of the final convolutional layer (128)?
If this is the case, I can create a pull request.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Recurrent Neural Networks - Combination of RNN and CNN
The layers one to five (Figure 4) are constrained to have the same number of feature maps K. Thereby RCNN-K denotes a network...
Read more >LSTMs for Human Activity Recognition Time Series ...
The model requires a three-dimensional input with [samples, time steps, features].
Read more >Plot causes "Error: Incorrect Number of Dimensions"
This produces an error: "Error: Incorrect Number of Dimensions". A similar error ( NAs by coercion ) is produced when attempting to cluster ......
Read more >Using effective dimension to analyze feature ...
We study three trained architectures: a 12-hidden layer multi-layer perceptron (MLP), a convolutional neural net- work (CNN) similar in architecture to VGG-16 ...
Read more >37 Reasons why your Neural Network is not working - Slav
If your input looks like (k, H, W) = (64, 64, 64) it's easy to miss errors related to wrong dimensions. Use weird...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, I’ll fix it.
Done. Thanks!