I solved that problem so thank u so much but I got another problem. I try to explain my problem briefly. Here is my simple nn:
class Model(nn.Module):
        def __init__(self, D_in, H1, H2, D_out):
                super().__init__()
                self.linear1 = nn.Linear(D_in, H1)
                self.linear2 = nn.Linear(H1, H2)
                self.linear3 = nn.Linear(H2, D_out)
        def forward(self, x):
                x = F.relu(self.linear1(x))  
                x = F.relu(self.linear2(x))
                x = self.linear3(x)
                return x

and my datasets names are train_x train y validation_x validation_y
I build these system on keras and it works fine and my keras code:
model = Sequential()

model.add(LSTM(16, input_shape=(1, 3), return_sequences=False))
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])
net_outputs_LDCC = model.predict(inputs_LDCC_ready, batch_size=batch_size)

so my question is that how can I get .predict() result at PyTorch? Because I want to compare real result and nn results.