TypeError: variable() got an unexpected keyword argument 'constraint'

漫长当下TIME 发布于 2018/05/11 21:28
阅读 616
收藏 0

在GitHub上下载的代码,运行下面错误:

Traceback (most recent call last):
  File "D:/PythonSpace/Experiment/FgSegNet-master01/FgSegNet/FgSegNet.py", line 228, in <module>
    train(results, scene, mdl_path, log_dir, vgg_weights_path)
  File "D:/PythonSpace/Experiment/FgSegNet-master01/FgSegNet/FgSegNet.py", line 143, in train
    model = model.initModel()
  File "D:\PythonSpace\Experiment\FgSegNet-master01\FgSegNet\FgSegNetModule.py", line 85, in initModel
    vgg_layer_output = self.VGG16(input_1)
  File "D:\PythonSpace\Experiment\FgSegNet-master01\FgSegNet\FgSegNetModule.py", line 27, in VGG16
    x = Conv2D(64, (3, 3), activation='relu', padding='same', name='block1_conv1', data_format='channels_last')(x)
  File "C:\Program Files\Python35\lib\site-packages\keras\engine\topology.py", line 576, in __call__
    self.build(input_shapes[0])
  File "C:\Program Files\Python35\lib\site-packages\keras\layers\convolutional.py", line 134, in build
    constraint=self.kernel_constraint)
  File "C:\Program Files\Python35\lib\site-packages\keras\legacy\interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\keras\engine\topology.py", line 400, in add_weight
    constraint=constraint)
TypeError: variable() got an unexpected keyword argument 'constraint'


     TypeError: variable() got an unexpected keyword argument 'constraint'
运行环境:Python3.5、TensorFlow-gpu1.4、keras2.06
本人部署完代码后,一直报这个错误,不知道什么原因?
哪位大神能指点一二?小弟在此谢过!

加载中
返回顶部
顶部