Hi I have this error and I am not sure why:
2019-11-10 19:28:49.105252: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-11-10 19:28:49.510154: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2400225000 Hz
2019-11-10 19:28:49.514852: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5eed2e0 executing computations on platform Host. Devices:
2019-11-10 19:28:49.514902: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/wanitchaya/deepcut/deepcut/train.py", line 188, in train_model
model = get_convo_nn2()
File "/home/wanitchaya/deepcut/deepcut/model.py", line 57, in get_convo_nn2
out = crf(x)
File "/home/wanitchaya/.local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "/home/wanitchaya/.local/lib/python3.5/site-packages/keras/engine/base_layer.py", line 463, in __call__
self.build(unpack_singleton(input_shapes))
File "/home/wanitchaya/deepcut/deepcut/layers.py", line 182, in build
constraint=self.kernel_constraint)
TypeError: add_weight() got multiple values for argument 'name'
System information
To reproduce this behavior
You can clone my github repo and go to the deepcut/deepcut directory. Then you can run this in python interpreter:
>>> import train
>>> train.train_model("cleaned_data", "../weight/model_crf_weight.h5")
Thank you so much for your help!
I am also getting the same error. Please help us in this.
Thank you

Please go to https://github.com/wanitchayap/deepcut/blob/master/deepcut/layers.py and find the above snippet. In _add_weight()_ function name the first arguments as 'shape' like:
self.kernel = self.add_weight(shape=(self.input_dim, self.units),
name='kernel',
initializer=self.kernel_initializer,
regularizer=self.kernel_regularizer,
constraint=self.kernel_constraint)
Do this in all your _add_weight_ functions. Most likely you will get rid of this error. This has worked for me.
Thank you,
Deepak Singh
I was getting the same error but your solution helped me to solve it :) tnx
Most helpful comment
Please go to https://github.com/wanitchayap/deepcut/blob/master/deepcut/layers.py and find the above snippet. In _add_weight()_ function name the first arguments as 'shape' like:
self.kernel = self.add_weight(shape=(self.input_dim, self.units),
name='kernel',
initializer=self.kernel_initializer,
regularizer=self.kernel_regularizer,
constraint=self.kernel_constraint)
Do this in all your _add_weight_ functions. Most likely you will get rid of this error. This has worked for me.
Thank you,
Deepak Singh