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

Looks like dynamically setting input size fails for Quantum LSTM #731

Open
DanielAtKrypton opened this issue Dec 22, 2020 · 5 comments
Open

Comments

@DanielAtKrypton
Copy link

Description of the problem

If you look at the logs:

tests/early_stopping_test.py ssss
tests/main_test.py sweight_shapes = (n_qlayers, n_qubits) = (1, 6)
Using device cpu
Re-initializing module because the following parameters were re-set: input_dim, output_dim.
weight_shapes = (n_qlayers, n_qubits) = (1, 2)
Re-initializing optimizer.
  epoch    train_loss    cp      dur
-------  ------------  ----  -------
      1        0.1551     +  11.5193

I was expecting that the reported weight_shapes still be (1, 6) after parameters re-set as specified in the test code.

@BenjaminBossan
Copy link
Collaborator

I had a look at your code but couldn't follow what happened. My best guess is that the shape is re-set to 2 because that's the default as defined here. If you want to always have it at 6, maybe you can specify that directly as a grid search parameter (with only the value 6).

@DanielAtKrypton
Copy link
Author

I had a look at your code but couldn't follow what happened. My best guess is that the shape is re-set to 2 because that's the default as defined here. If you want to always have it at 6, maybe you can specify that directly as a grid search parameter (with only the value 6).

It was supposed to work as documented here. Since the code is using InputShapeSetter.

@BenjaminBossan
Copy link
Collaborator

I still cannot really figure out what happens in your code, which test is called with what data, where weight_shapes = (n_qlayers, n_qubits) = (1, 2) is printed etc. Ideally, you could produce a minimal code example that reproduces the error.

@BenjaminBossan
Copy link
Collaborator

@DanielAtKrypton any updates?

@DanielAtKrypton
Copy link
Author

@DanielAtKrypton any updates?

I will come back to this and follow your suggestion of minimal code example as soon I have a couple higher priorities sorted out. Thank you @BenjaminBossan.

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

2 participants