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

Anyone have some idea of time series forecasting problem using DARTS strategy over the search space of Recurrent neural networks? #5770

Open
franciszh0716 opened this issue Apr 18, 2024 · 0 comments

Comments

@franciszh0716
Copy link

Describe the issue:
I go through different 3 types of Neural Networks for the forecasting problem. All of them have the similar structure: Recurrent layer, and two dense layer. However when I tried with just modify the Recurrent layer to Layerchoice, there always have some problem like

File ~/Documents/GitHub/NAS/nni/nni/nas/experiment/experiment.py:270, in NasExperiment.start(self, port, debug, run_mode)
...
1079 f"For unbatched 2-D input, hx should also be 2-D but got {hx.dim()}-D tensor")
1080 hx = hx.unsqueeze(1)
1081 else:

RuntimeError: For unbatched 2-D input, hx should also be 2-D but got 3-D tensor.

Where

X_train, X_test, y_train, y_test = train_test_split(X_tensor, Y_tensor, random_state = 0)
print(X_train.shape, X_test.shape, y_train.shape, y_test.shape)

is

torch.Size([9656, 300]) torch.Size([3219, 300]) torch.Size([9656]) torch.Size([3219])
and the Dataloader is set as
train_dataset = TensorDataset(X_train, y_train.unsqueeze(1))
test_dataset = TensorDataset(X_test, y_test.unsqueeze(1))
train_loader = DataLoader(train_dataset, batch_size=128, shuffle=True)
test_loader = DataLoader(test_dataset, batch_size=128, shuffle=False)

I'm not sure what is the exact issue happening here.

Environment:

  • NNI version: 3.0rc1
  • Training service (local|remote|pai|aml|etc): local
  • Client OS: macOS Sonoma 14.4 (23E214)
  • Server OS (for remote mode only): N/A
  • Python version: 3.11.8
  • PyTorch/TensorFlow version: 2.2.1
  • Is conda/virtualenv/venv used?: conda has been used
  • Is running in Docker?: no

Configuration:

  • Experiment config (remember to remove secrets!):
  • Search space: RNN, GRU, and LSTM if the output problem can be solved

Log message:

  • nnimanager.log:
  • dispatcher.log:
  • nnictl stdout and stderr:

How to reproduce it?:

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

1 participant