weixin_47466565 2021-04-27 23:57 采纳率: 0%
浏览 549

AttributeError: can't set attribute

深度学习萌新,求大佬帮忙看看这个问题。

Traceback (most recent call last):
  File "D:/PYTHON/Human-Pose-Estimation-master/training/train_pose.py", line 223, in <module>
    multisgd = MultiSGD(lr=base_lr, momentum=momentum, decay=0.0,
  File "D:\PYTHON\Human-Pose-Estimation-master\training\optimizers.py", line 26, in __init__
    self.lr = K.variable(lr, name='lr')
AttributeError: can't set attribute

 

multisgd = MultiSGD(lr=base_lr, momentum=momentum, decay=0.0,
                    nesterov=False, lr_mult=lr_multipliers)
def __init__(self, lr=0.01, momentum=0., decay=0.,
             nesterov=False, lr_mult=None, **kwargs):
    super(MultiSGD, self).__init__(**kwargs)
    with K.name_scope(self.__class__.__name__):
        self.iterations = K.variable(0, dtype='int64', name='iterations')
        self.lr = K.variable(lr, name='lr')
        self.momentum = K.variable(momentum, name='momentum')
        self.decay = K.variable(decay, name='decay')
    self.initial_decay = decay
    self.nesterov = nesterov
    self.lr_mult = lr_mult
  • 写回答

5条回答 默认 最新

  • 关注

    这里没有代码也不知道是什么问题哦,把代码贴出来看看,看你这个代码好像没什么问题,可能是版本兼容性问题。

    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序