Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keras example Type Error

Tags:

keras

I installed WinPython and Keras 0.1.2 in my Win64 System, then I started to run the examples provided in Keras source code floder, but lots errors occured make me frustrated - -!

Somebody help me, thanks for any tips.

I try to run 'mnist_mlp.py', but an error occured in the line blow:

    model.add(Dense(128, input_shape=(784,)))
    TypeError:__init__() got an unexpected keyword argument 'input_shape'

then I find the examples on http://keras.io/examples/ and when I run to the line below I still faced some error.

    model.add(Dense(20, 64, init='uniform'))
    TypeError:__init__() got multiple values for keyword argument 'init'

Keras Error

like image 329
joe Avatar asked Sep 22 '26 06:09

joe


1 Answers

The examples http://keras.io/examples/ have not been updated after the recent API changes https://groups.google.com/forum/#!topic/keras-users/iWVrWpR_eaQ.

Make sure you have the latest version of Keras installed with:

sudo pip install git+git://github.com/fchollet/keras.git --upgrade

and use updated examples from the same repository https://github.com/fchollet/keras/tree/master/examples

like image 178
Mikael Rousson Avatar answered Sep 24 '26 00:09

Mikael Rousson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!