unet icon indicating copy to clipboard operation
unet copied to clipboard

TypeError: ('Keyword argument not understood:', 'input')

Open qihanghu opened this issue 4 years ago • 7 comments

tensorflow 2.1.0 keras 2.3.1

2020-05-07 10:45:39.914860: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-05-07 10:45:39.927182: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x147d15a70 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-07 10:45:39.927205: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
  File "main.py", line 16, in <module>
    model = unet()
  File "/Users/qihang/.Trash/unet-master/model.py", line 55, in unet
    model = Model(input = inputs, output = conv10)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 146, in __init__
    super(Model, self).__init__(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 172, in __init__
    self._init_subclassed_network(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/training/tracking/base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 383, in _init_subclassed_network
    self._base_init(name=name, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/training/tracking/base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 199, in _base_init
    'autocast'})
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow_core/python/keras/utils/generic_utils.py", line 718, in validate_kwargs
    raise TypeError(error_message, kwarg)
TypeError: ('Keyword argument not understood:', 'input')

qihanghu avatar May 07 '20 02:05 qihanghu

Did you find a solution for this problem?

kanand77 avatar Jul 01 '20 01:07 kanand77

Did you find a solution for this problem?

Try to replace this model = Model(input = inputs, output = conv10) to model = Model(inputs, conv10) in file model.py line 55

thedeoxen avatar Jul 29 '20 10:07 thedeoxen

cool thedeoxen. helped me.

davidbenshimon avatar Aug 04 '20 11:08 davidbenshimon

can replace like that: model = Model(inputs, outputs = conv10)

NguyenDangBinh avatar Aug 11 '20 03:08 NguyenDangBinh

i'm working on windows 10 with tensorflow 2.3.0 and keras 2.4.3 but none of those fixes worked for me I've even tried to make them a list i.e. model=Model(inpus=[net_inputs], outputs=[conv10]) but none of it worked. curiously it worked on colab with the same tf and keras version (some linux dist).

mikelty avatar Sep 09 '20 02:09 mikelty

model = Model(inputs=inputs, outputs= conv10) works as well

lydiaCS avatar Jan 28 '21 16:01 lydiaCS

can replace like that: model = Model(inputs = inputs, outputs = conv10)

ghost avatar Mar 21 '21 06:03 ghost