gmongaras / diffusion_models_from_scratch Goto Github PK
View Code? Open in Web Editor NEWCreating a diffusion model from scratch in PyTorch to learn exactly how they work.
License: MIT License
Creating a diffusion model from scratch in PyTorch to learn exactly how they work.
License: MIT License
when I run this code,
X = torch.einsum("nclw, ncC -> nclw", X, KQ)
A issue was occurred as the title describes
Any tips?
Hi, thank you for your great repository.
I think there is an issue in Line 27-28 in src/blocks/PositionalEncoding.py.
# Sin/Cos transformation for even, odd indices
embeddings[::2] = embeddings[::2].sin()
embeddings[1::2] = embeddings[1::2].cos()
I think it has to be
# Sin/Cos transformation for even, odd indices
embeddings[:, ::2] = embeddings[:, ::2].sin()
embeddings[:, 1::2] = embeddings[:, 1::2].cos()
Hello!
I am trying to make to train a model myself using Imagenet64x64 for a test; on a MAC using "mps" device.
It took me a little while to see that after downloading Imagenet64x64, I have to
— use "loadImagenet64.py" to generate .pkl files in an "Imagenet64" folder.
— THEN use "make_massive_tensor.py" to make a large .pt file.
— THEN use "train.py" which will call "model_trainer.py"
Apparently (tell me if I am wrong):
— "loadImagenet64.py" needs "Imagenet64_train_part1.zip" and "Imagenet64_train_part2.zip".
Imagenet64x64 does not have these files. It rather has:
train_data_batch_1, train_data_batch_2, train_data_batch_3... etc
— I changed the code in "loadImagenet64.py" to make a series of img and label .pkl files within the "Imagenet64" folder.
— Then, when running "make_massive_tensor.py", I get the following errors:
Shape error with file data/Imagenet64/n.pkl
Key error with file data/Imagenet64/metadata.pkl
— I probably did something wrong in "loadImagenet64.py" with the formatting of pickles. But I do not know where that is happening. Dict's keys seem fine: loadImagenet64 seems to replace 'data', 'mean', 'labels' found in Imagenet64 with 'data', 'mean', 'labels'.
=> Where did you get "Imagenet64_train_part1.zip" OR how did you make them?
=> How to deal with the shape and dict keys within those .pkl ?
Thank you for your help!!!
O.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.