Hello everyone! I’m writing this post because I am having trouble implementing a neural network in Pytorch being used to Keras.
Considering the input has dimension (6,3,1) - I am trying to work with time series forecasting, I would like to implement the following network:
model = Sequential()
model.add(Conv1D(filters=64, kernel_size=2, activation='relu', input_shape=(3, 1)))
model.add(MaxPooling1D(pool_size=2))
model.add(Flatten())
model.add(Dense(50, activation='relu'))
model.add(Dense(1))

I tried with:
MyNet = nn.Sequential(
        nn.Conv1d(3,1,2),
        nn.MaxPool1d(2,stride=None),
        nn.Flatten(start_dim=1),
        nn.Linear(64,50),
        nn.Linear(50, 1)
        )

but it doesn’t work. I believe the problem is related to Conv1d. Can you please explain me my mistakes?
Thank you!