question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

_build_wrapper() got an unexpected keyword argument 'inputs'

See original GitHub issue

Bug Description

I`m trying to run example with mnist but got error.

Code

import autokeras as ak from tensorflow.python.keras.datasets import mnist import numpy as np (x_train, y_train), (x_test, y_test) = mnist.load_data() data_slice = 50 x_train = x_train[:data_slice] y_train = y_train[:data_slice] x_test = x_test[:data_slice] y_test = y_test[:data_slice] x_train = x_train.astype(np.float64) x_test = x_test.astype(np.float64) if len(np.shape(x_train)) == 3: x_train = x_train.reshape(x_train.shape + (1,)) x_test = x_test.reshape(x_test.shape + (1,)) clf = ak.ImageClassifier(max_trials=3) clf.fit(x_train, y_train, validation_data=(x_test, y_test)) y = clf.predict(x_test, y_test)

Error

Traceback (most recent call last): File “/home/scrambler/pycharm/autokeras_1/test_1.py”, line 20, in <module> clf.fit(x_train, y_train, validation_data=(x_test, y_test)) File “/home/scrambler/pycharm/autokeras_1/venv/lib/python3.6/site-packages/autokeras/auto_model.py”, line 123, in fit preprocess_graph, keras_graph = self.hyper_graph.build_graphs(hp) File “/home/scrambler/pycharm/autokeras_1/venv/lib/python3.6/site-packages/autokeras/hypermodel/graph.py”, line 434, in build_graphs plain_graph = self.hyper_build(hp) File “/home/scrambler/pycharm/autokeras_1/venv/lib/python3.6/site-packages/autokeras/hypermodel/graph.py”, line 454, in hyper_build outputs = old_block.build(hp, inputs=inputs) TypeError: _build_wrapper() got an unexpected keyword argument ‘inputs’

Setup Details

I have old computer with no AVX, so i used compiled tensorflow whl from here: https://github.com/yaroslavvb/tensorflow-community-wheels/issues/113

here is my venv: Keras 2.3.1 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 Markdown 3.1.1 PyYAML 5.1.2 Werkzeug 0.16.0 absl-py 0.8.1 astor 0.8.0 autokeras 1.0.0a0 cachetools 3.1.1 certifi 2019.9.11 chardet 3.0.4 colorama 0.4.1 gast 0.2.2 google-auth 1.7.0 google-auth-oauthlib 0.4.1 google-pasta 0.1.8 grpcio 1.25.0 h5py 2.10.0 idna 2.8 joblib 0.14.0 keras-tuner 1.0.0 lightgbm 2.3.0 mock 3.0.5 numpy 1.17.3 oauthlib 3.1.0 opt-einsum 3.1.0 pandas 0.25.3 pip 19.0.3 protobuf 3.10.0 psutil 5.6.5 pyasn1 0.4.7 pyasn1-modules 0.2.7 python-dateutil 2.8.1 pytz 2019.3 requests 2.22.0 requests-oauthlib 1.3.0 rsa 4.0 scikit-learn 0.21.3 scipy 1.3.1 setuptools 41.6.0 six 1.13.0 tabulate 0.8.5 tb-nightly 1.14.0a20190603 tensorflow 2.0.0b1 termcolor 1.1.0 terminaltables 3.1.0 tf-estimator-nightly 1.14.0.dev2019060501 tqdm 4.37.0 urllib3 1.25.6 wheel 0.33.6 wrapt 1.11.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TreeKat71commented, Nov 13, 2019

Hi guys, I encountered this situation as well and I found autokeras use keras-tuner as part of it. In the master branch, keras-tuner just fixed it. SO you can fixed by install it from master. pip install git+git://github.com/keras-team/keras-tuner@master#egg=kerastuner It just a workaround if you want to run the example, it may encounter other unknown bugs so don’t use in production.

0reactions
haifeng-jincommented, Jan 17, 2020

It should be solved in the latest released version of AutoKeras.

Read more comments on GitHub >

github_iconTop Results From Across the Web

__init__() got an unexpected keyword argument 'inputs' · Issue ...
Hello. I try to make a model on a functional API with the participation of recursive layers. >>> inputs = Input( shape=( 4,...
Read more >
keras - __init__() got an unexpected keyword argument 'inputs'
I am trying to execute the above code and getting the above mentioned error. I am on version 2.2.4-tf of Keras. I am...
Read more >
tensor.__init__() got an unexpected keyword argument 'shape'
Okay, I get it, the input to cumtrapz() needs to be an array. But I cannot convert the generator output tensor x_fake to...
Read more >
Obtain_input_shape() got an unexpected keyword argument ...
HI, While running the code model = VGG16_Avg(include_top=False) in Neural Transfer notebook i am getting the error as: ypeError Traceback ...
Read more >
Error Message "Unexpected keyword argument passed to ...
TypeError: Unexpected keyword argument passed to optimizer: learning_rate. Possible Causes. Certain parameters have been renamed in Keras.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found