GithubHelp home page GithubHelp logo

Invalid float about neural-style-transfer HOT 7 CLOSED

titu1994 avatar titu1994 commented on August 11, 2024
Invalid float

from neural-style-transfer.

Comments (7)

titu1994 avatar titu1994 commented on August 11, 2024

Well that's a new bug. Must be a localisation bug ? Are you in a country which uses ',' instead of '.' to demark decimal point ?

I'm currently under a ton of course load. If you can find a fix, please make a pull request at https://github.com/titu1994/Neural-Style-Transfer-Windows

from neural-style-transfer.

Ratinod avatar Ratinod commented on August 11, 2024

Yes. It's localisation bug.

"...please make a pull request..."

I'm sorry, but I have no idea how to do it.
But I found working (probably only for me) solution.

Need add this:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

before all Convert.ToDouble

"all" mean:

CheckTVWeignt()
CheckStyleScale()
CheckMinThreshold()
CheckContentWeignt()

in MainForm.cs

But, even after that, again, there are errors. And I don't know how to fix it, and what's the problem ...
Here are screenshots of errors.
Need some help. Again.

from neural-style-transfer.

titu1994 avatar titu1994 commented on August 11, 2024

That error has been corrected in an earlier commit. You can download the repo again or copy paste the most recent code to get that working.

I'll be using your fix after testing that it doesn't break anything else in a few days.

from neural-style-transfer.

Ratinod avatar Ratinod commented on August 11, 2024

"...download the repo again..."

And then there was a new "bug"... Screenshot
An endless stream of errors...
What's wrong now? How to fix it?
P.S. I'm tired of trying to catch each time disappearing ( in an instant) window with error.

from neural-style-transfer.

titu1994 avatar titu1994 commented on August 11, 2024

Are you using Theano in GPU mode? Because your errors suggest that you are using the CPU. This code is not meant for CPU execution, since it takes thousands of seconds per iteration on even the most powerful CPUs.

This is an error with linking BLAS libraries on CPU mode.

To setup Theano on GPU, use the Guide.md on the repo page. It has full instructions to setup Theano with GPU on windows.

As a side note, in order to see the error screen properly, there is a second button called "Copy to Clipboard" which copies the arguments.

Then travel to the place where the program is, go to the script directory, open a cmd with Shift + right click at that location and type python network.py (with the space) and then paste (right click and paste, or ctrl V if on windows 10).

Then the error screen will stay on the screen.

from neural-style-transfer.

Ratinod avatar Ratinod commented on August 11, 2024

At last I was able to get it to work properly!
My problem was that I didn't see anywhere mention in "README.md" about "Guide.md" until you say me that.
It turned out that it is necessary to use the Anaconda 3 (I had Anaconda 2). And instead of "Visual Studio 2015" need to use "Visual Studio 2013".
Ideally, you want someone to make a complete video tutorial that shows virtually all the steps for windows. But not me. I had enough. It should be mentioned in README.md about Guide.md . (Really. It is important information.)
Screenshots with my test.
Now I'm going to learn how to achieve interesting results by changing settings.

Thank you very much for your help!

And I apologize for the grammatical errors in the comments. (If they exist in the text)[because google translate]

from neural-style-transfer.

titu1994 avatar titu1994 commented on August 11, 2024

Umm, the second paragraph in the Readme.md is titled Guide with the first sentence pointing to the guide.md. Anyway. I guess I should make it more explicit.

from neural-style-transfer.

Related Issues (20)

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.