Code Monkey home page Code Monkey logo

Comments (11)

JAStark avatar JAStark commented on July 18, 2024 19

The issue arises from:
model.fit(X_train, y_train_ohe, nb_epoch=50, batch_size=300, verbose=1, validation_split=0.1, show_metrics=True)
which is from a book (Python Machine Learning by @rasbt https://github.com/rasbt/python-machine-learning-book. It's awesome, but I guess the code gets old quick!)

The new way of doing it means to add metrics=['accuracy'] to the model.compilesection, rather than themodel.fit`:

model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])
I've just run into this issue, and changing the code in these places worked for me :D

from hyperas.

jdelange avatar jdelange commented on July 18, 2024 5

@isrugeek As noted above: replace the show_accuracy=True statement with metrics=['accuracy'] I'm not sure exactly where this applies, but it is either in the code you are writing, or it is in existing (example) code in Keras/Hyperas if it has not yet been fixed. Note: I had too many issues with Hyperas, I used Hyperopt instead.

from hyperas.

isrugeek avatar isrugeek commented on July 18, 2024 3

@jdelange Thanks but after i changed it shows me another error

TypeError: Received unknown keyword arguments: {'metrics': ['accuracy']}

from hyperas.

jdelange avatar jdelange commented on July 18, 2024 2

@isrugeek Sorry, can't see what you are doing. The syntax provided is correct, so the call may not be applicable/available in your case? Sounds quite basic. Not sure how experienced you are. Have a look at this site Machine learning mastery lots of basic examples to get started. Helped me a lot.

from hyperas.

isrugeek avatar isrugeek commented on July 18, 2024

@jdelange How did you fix this issue i also got this Issue in my Project ( Not this Code)
Thanks in Advance

from hyperas.

isrugeek avatar isrugeek commented on July 18, 2024

@jdelange Thanks buddy. i am confused because it works on my different machine and not on MacBook . any how i fixed the problem by edit the Model.py( Keras File) by comparing my Old machine.

Thanks

from hyperas.

rasbt avatar rasbt commented on July 18, 2024

@JAStark The keras section? Oh yeah, that was 2015 :P. The next edition will have up-to-date tensorflow >= 1.0 code ;)

from hyperas.

JAStark avatar JAStark commented on July 18, 2024

@rasbt yes! Chapter 13 :)

from hyperas.

maxpumperla avatar maxpumperla commented on July 18, 2024

ok, it's updated now in the readme. Note that you're free to leave out additional arguments in examples as you want, hyperas is just a wrapper, not a prescription. :)

from hyperas.

beyhangl avatar beyhangl commented on July 18, 2024

@JAStark thanks

from hyperas.

gontthias avatar gontthias commented on July 18, 2024

@JAStark good answer,thanks

from hyperas.

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.