Hi everyone, I wonder that  can I write same nn module on Pytorch
My keras codes are:
  model = Sequential()

  # model.add(LSTM(12, input_shape=train_x.shape[1:], return_sequences=True))
  # model.add(Activation('tanh'))
  # model.add(LSTM(32, input_shape=train_x.shape[1:], return_sequences=False))
  model.add(LSTM(16, input_shape=(1, 3), return_sequences=False))
  model.add(Activation('relu'))
  # model.add(Dense(12, input_shape=train_x.shape[1:]))
  # model.add(Activation('relu'))
  model.add(Dense(12))
  model.add(Activation('relu'))
  model.add(Dense(1))

  model.compile(loss='mse',
                optimizer='adam',
                metrics=['mse'])

model.fit(train_x, train_y, 
          batch_size=batch_size,
          epochs=500,
          validation_data=(val_x, val_y),
          callbacks = [tensorboard_CB])

I have been trying for one week to write this in PyTorch but I confront with problem which is train_x=[23k,1,3] and train_y=[23k,1] so their shapes are not same so I cannot train nn on PyTorch