Hi everyone ,
I got a trouble with Model.compile().
Here is my code:
def create_model(my_learning_rate , feature_layer , my_metrics):
"""Create and compile a simple classification model."""
model = tf.keras.models.Sequential()
model.add(feature_layer)
model.add(tf.keras.layers.Dense(units=1 , input_shape=(1,) ,
activation=tf.sigmoid),)
model.compile(optimizer=tf.keras.optimizers.RMSprop(learning_rater=my_learning_rate),
loss=tf.keras.losses.BinaryCrossentropy(),
metric=my_metrics)
return model
Here is the log:
File âC:\Users\dell\OneDrive - khang06\My-Workspace\venv\lib\site-packages\keras\optimizers\optimizer_v2\rmsprop.pyâ, line 140, in __init__super().init(name, kwargs)
File âC:\Users\dell\OneDrive - khang06\My-Workspace\venv\lib\site-packages\keras\optimizers\optimizer_v2\optimizer_v2.pyâ, line 370, in __init__raise TypeError(TypeError: Unexpected keyword argument passed to optimizer: learning_rater. Allowed kwargs are {âlrâ, âglobal_clipnormâ, âclipnormâ, âclipvalueâ, âdecayâ}.
Hopefully , i will be helped. Thanks.