titu1994 / keras-adabound

Keras implementation of AdaBound
MIT License
130 stars 35 forks source link

Can't set attribute #9

Open mminakshi opened 4 years ago

mminakshi commented 4 years ago

File "/adabound.py", line 40, in init self.lr = K.variable(lr, name='lr') AttributeError: can't set attribute

guptakhil commented 4 years ago

Change lr to learning_rate in adabound.py file to make it compatible with the latest version of Keras >= 2.3.0.

reydenX commented 4 years ago

I didn't work for me, can you be more specific, please.

nicolastonon commented 4 years ago

Same problem here, under Keras 2.3.1.

I simply changed l.40 to : self.lr = K.variable(learning_rate, name='lr') but that does not solve the issue. Do you know what could? Thanks !

guptakhil commented 4 years ago

@nicolastonon:

You'll have to change L40 to self.learning_rate = K.variable(learning_rate, name='learning_rate'). Subsequently, self.lr to self.learning_rate everywhere.

Hope that helps.

wuyun-long commented 3 years ago

Use an earlier version of Keras to solve this problem