GithubHelp home page GithubHelp logo

Comments (6)

nlbrown62 avatar nlbrown62 commented on May 2, 2024 1

I had a similar issue when I upgraded to Tensorflow 2.16.1, Python 3.12.2. In my case, I triggered the error "ValueError: Invalid dtype: str39968" when trying to run the 'fit' function for a very similar RNN with string data (dtype <U1249). For a quick workaround, the fit function works when setting the dtype to a generic 'object' (i.e. x_train = x_train.astype(object). In Tensorflow 2.15.0 , Python 3.9.16, I didn't have the same issue.

from tensorflow.

sushreebarsa avatar sushreebarsa commented on May 2, 2024

@maxlelyonais Please make sure the string data uses the same encoding as the rest of your code?
Could you provide the access to the colab gist you have provided?
Thank you!

from tensorflow.

maxlelyonais avatar maxlelyonais commented on May 2, 2024

Sorry for the delay, yes here is the colab gist: https://colab.research.google.com/gist/maxlelyonais/28bd9f80a71a55ec9513950c057cf5c6/clasificacion_de_spam.ipynb

from tensorflow.

sushreebarsa avatar sushreebarsa commented on May 2, 2024

@maxlelyonais Could you please have a look at the workaround provided by @nlbrown62 and let us know?
Thank you!

from tensorflow.

maxlelyonais avatar maxlelyonais commented on May 2, 2024

It works perfectly, May I know why using 'object' works?

from tensorflow.

sushreebarsa avatar sushreebarsa commented on May 2, 2024

@maxlelyonais object dtype in TensorFlow acts as a catch-all for various data types, including strings of any length.
Thank you!

from tensorflow.

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.