Giter VIP home page Giter VIP logo

Comments (6)

HavenFeng avatar HavenFeng commented on June 23, 2024

Oh, I just found it's a numpy reshape problem. The code runs very well.

from download-celeba-hq.

vjtrost88 avatar vjtrost88 commented on June 23, 2024

@HavenFeng I'm having the same problem here - what was your reshaping solution?

from download-celeba-hq.

vjtrost88 avatar vjtrost88 commented on June 23, 2024

Figured it out. For anyone else who might be encountering this problem, use the following:
img = img.transpose(0,2,3,1) where img is the numpy array for the image. Just need to reorder things, so image stays first, height second, width third, and channels fourth.

from download-celeba-hq.

nperraud avatar nperraud commented on June 23, 2024

So should I change something in my code?

from download-celeba-hq.

vjtrost88 avatar vjtrost88 commented on June 23, 2024

@nperraud I don't think so - unless you want your code to save image files too. The code does a great job of reconstructing the .npy files. Images are icing on the cake. Thanks for this repo, it worked great and helped a ton!

from download-celeba-hq.

nperraud avatar nperraud commented on June 23, 2024

Happy that you found it useful!
Thanks for your clear answer.

from download-celeba-hq.

Related Issues (18)

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.