ziyiyituxe
ziyiyituxe

Reputation: 197

How to use conv2d in this case

I want to create an NN layer such that:

If I understand it correctly I can use Conv2d for this problem. But I'm not sure how to correctly choose conv2d parameters.

Is Conv2d suitable for this task? If so, what are the correct parameters? Is that

Upvotes: 0

Views: 64

Answers (1)

Chillston
Chillston

Reputation: 301

You can use either Conv2D or Conv1D. With the data shaped like batch x 100 x n_features you can use Conv1D with this setup:

Input channels:  n_features
Output channels: 3 * output_features
kernel:          5
strides:         5

Thereby, the kernel is applied to 5 samples and generates 3 outputs. The values for n_features and output_features can be anything you like and might as well be 1. Setting the strides to 5 results in a non-overlapping convolution so that each block uniquely contributes to one output.

Upvotes: 1

Related Questions