Giter Club home page Giter Club logo

Comments (11)

PatriceVignola avatar PatriceVignola commented on July 21, 2024 1

Right, these are the more dangerous changes in the APIs since they don't throw errors and will just silently give you the wrong answer. This can make it hard to backport a script from 2.0 to 1.15. Sometimes, some 2.0 APIs just don't exist in 1.15 (or require a lot more work to make it work).

from tensorflow-directml.

PatriceVignola avatar PatriceVignola commented on July 21, 2024

Hi @TashaSkyUp,

Have you tried running this script with the official tensorflow 1.15 package? pip install tensorflow==1.15 --force-reinstall

tensorflow-directml doesn't really modify the API surface since we want scripts to be compatible as much as possible with the official package, and this particular error looks like an issue at the python level. It could still be an error on our side, but I want to make sure that you're not getting the same error with the official tensorflow 1.15 package before.

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

Thank you no I have not I had it working in TF 2.x I did not realize this project was only for TF 1.15? Its probably that i'm not using standard conventions as far as how to organize my input ("x") . But im self taught so right now how i do things is an amalgamation of 100 tutorials 4 udemy classes and 10000 stack overflow posts.

from tensorflow-directml.

PatriceVignola avatar PatriceVignola commented on July 21, 2024

Yes, this project is based on TF 1.15.

TF 1.15 and TF 2.x have quite a few differences when it comes to the API. The biggest one is probably that TF 2.x uses eager execution by default, but you need to manually enable it for TF 1.15. I think this could be the cause of the error here.

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

I enabled it already actually, that was one of many things I've done to make this work again. also replacing line 1871 with line 1873 seems to have worked for getting training going.. but now my output when i call the model is.. wrong.. Direct ml with my 5700x is about 2.5x faster than my cpu (3900x) But i dont know if i want to start over completely. I've been working on this sooo long.

from tensorflow-directml.

PatriceVignola avatar PatriceVignola commented on July 21, 2024

The easiest way to know whether the wrong output is caused by tensorflow-directml is to run your script with the tensorflow 1.15 package and compare the results between the two.

Otherwise, if it's possible for you to share the script (e.g. if it's on a github or somewhere else), we could give it a look.

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

That sounds like a great Idea I should be able to share the code.. ill make a repo...

https://github.com/TashaSkyUp/UnShiney/blob/main/UnShineyMask.ipynb

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

tested after re installing tf 1.15. Having both of the same problems.

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

So for my output problem. It looks like tf 1.15 handles

img= tf.keras.preprocessing.image.load_img(img,color_mode="grayscale")

differently then my implementation I had when using 2.0
1.15 ends up with an array of floats between 0 and 255
2.0 ended up with floats between 0 and 1

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

I created a pull request to fix this.

from tensorflow-directml.

TashaSkyUp avatar TashaSkyUp commented on July 21, 2024

#75

from tensorflow-directml.

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.