Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to concatenate the feature maps of 3D convolution and the features maps of 2D convolution #3

Closed
qianngli opened this issue Dec 11, 2019 · 5 comments

Comments

@qianngli
Copy link

Dear authors,
I have read your code, but I have one question about the concatenting connection about 3/2D convolution.

The paper (MiCT: Mixed 3D/2D Convolutional Tube for Human Action Recognition) try to select one channel ( a tensor with NCWH) to ahieve 2D convolution operation and select several channels (a tensor with NCDW*H) to achieve 3D convolution operation. I don't konw how to concatenate the feature maps of 3D convolution and the features maps of 2D convolution. If convenient, please answer this question.

Regards,
Lee

@gongsuming
Copy link

你好啊,我想问一下,代码里CSV文件您有吗?有的话发我一份吧
谢谢

@qianngli
Copy link
Author

qianngli commented Jan 3, 2020 via email

@gongsuming
Copy link

那再打扰一下,您跑起这个程序了吗? 或者说您自己写了data-loader程序?
谢谢

@fmahoudeau
Copy link
Owner

Hello,
let’s take for example the initial 3D & 2D convolutions.

  • Assuming a batch size of 128 and input sequences of 16 frames, the input has shape 128x3x16x160x160.
  • The first Conv3D has stride 1 along the temporal dimension and 2 along the spatial dimensions. It has 64 kernels so it outputs feature maps of shape 128x64x16x80x80.
  • The first Conv2D also has stride 2 and 64 kernels but requires 4D input tensors. The input is reshaped to 2048x3x160x160 by stacking the frames of the 128 video sequences along the batch dimension (using function _to_4d_tensor). The output has shape 2048x64x80x80. The videos sequences are unstacked to obtain shape 128x64x16x80x80 (using function _to_5d_tensor)
  • The 2 tensors can now be sumed.

The MiCT blocks work the same way. I hope it clarifies.

@gongsuming
Copy link

Thank you very much!

@fmahoudeau fmahoudeau pinned this issue Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants