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

error about run the code #3

Open
QingXia0177 opened this issue Apr 7, 2023 · 2 comments
Open

error about run the code #3

QingXia0177 opened this issue Apr 7, 2023 · 2 comments

Comments

@QingXia0177
Copy link

Dear Prof. Stoudenmire
I am a Chinese postgraduate student majoring in quantum computing and machine learning. Recently, I read your paper ''Supervised Learning with Tensor Networks'', which inspired me a lot.But I encountered some issues that prevented the code from running successfully. I guess it's a version incompatibility issue. Now, I would like to know the version of itensor you are running this code with, and libpng version, png++version, gcc/g++version, and operating system version.
I appreciate your help in advance.
Best regards,
Qing Xia

@emstoudenmire
Copy link
Owner

Dear Qing,
Thanks for your interest and glad you found the paper inspiring!

Unfortunately I don't have the information anymore about the library or operating system versions, since I wrote this code initially 7 years ago and haven't touched it since about 4 years ago. It is posted online purely for academic / educational purposes only, meaning just if one wants to read portions of the code. If you do want to get it to compile, the only thing you can do (which is what I would have to do also) is just to see what error messages you get and then fix the corresponding errors. Compilers such as clang can give very helpful error messages.

Also it's important to note that this code gives very far from state of the art performance. It was just my first attempt making a code to do this, and later others made faster codes. In general, the subject of using tensor networks to do machine learning is still very much a research subject and I don't think fast enough algorithms have really been discovered yet (gradient descent is in general a very slow algorithm, which is why so many machine learning groups have to use GPUs to get good enough results etc.). If you are interested in performing gradient descent on an MPS, though, there are more state of the art implementations or best of all you might want to write your own implementation.

Here is the message from the README:
"""
NOTE: these codes are research, proof-of-principle codes only, and are not intended to demonstrate the state of the art in terms of training times for matrix product states for machine learning

If you are seeking fast approaches for optimizing MPS, we recommend trying newer libraries which use stochastic gradient optimization methods, such as TorchMPS: https://github.com/jemisjoky/TorchMPS
"""

Good luck, and let me know if you have any technical questions about the paper.

Miles

@QingXia0177
Copy link
Author

Dear Prof. Stoudenmire
I apologize for replying so late. Thank you for your suggestion. Next, I will use the code you recommended( https://github.com/jemisjoky/TorchMPS )Learn MPS.
Best regards,
Qing Xia

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