Git Product home page Git Product logo

quantum-diffusion's Introduction

Quantum Denoising Diffusion Models

1707404365914

Install the requirements: pip install -r requirements.txt (preferably in a virtual environment).

  • Run python main.py --help to see all the options.
  • Run python main.py to train and evaluate a Q-Dense model on the MNIST 8x8 dataset.

quantum-diffusion's People

Contributors

michaelkoelle avatar

Stargazers

 avatar  avatar

Watchers

 avatar Kostas Georgiou avatar

quantum-diffusion's Issues

mnist_32x32 training err

Got error while trying to train with 32x32 MNIST
python main.py --data mnist_32x32

Traceback (most recent call last): File "/mnt/working/quantum-diffusion/src/main.py", line 175, in <module> train() File "/mnt/workinge/quantum-diffusion/src/main.py", line 103, in train batch_loss, _ = diff(x=x, y=y, T=args.tau, verbose=True) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/mnt/working/quantum-diffusion/src/models.py", line 63, in forward return self.run_training_step_noise(x, **kwargs) File "/mnt/working/quantum-diffusion/src/models.py", line 136, in run_training_step_noise predicted_noise = self.net.forward(x=batches_noisy) File "/mnt/working/quantum-diffusion/src/nn/qdense.py", line 53, in forward x = self.qnode(x) File "/usr/local/lib/python3.10/dist-packages/pennylane/qnode.py", line 842, in __call__ self.construct(args, kwargs) File "/usr/local/lib/python3.10/dist-packages/pennylane/qnode.py", line 751, in construct self._tape = make_qscript(self.func)(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/pennylane/tape/qscript.py", line 1371, in wrapper result = fn(*args, **kwargs) File "/mnt/working/quantum-diffusion/src/nn/qdense.py", line 36, in _circuit qml.AmplitudeEmbedding( File "/usr/local/lib/python3.10/dist-packages/pennylane/templates/embeddings/amplitude.py", line 128, in __init__ features = self._preprocess(features, wires, pad_with, normalize) File "/usr/local/lib/python3.10/dist-packages/pennylane/templates/embeddings/amplitude.py", line 205, in _preprocess raise ValueError( ValueError: Features must be of length 64 or smaller to be padded; got length 1024.

Seems like dimension errs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.