We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lr
lr and decay are deprecated in Keras optimizer, using learning_rate corrects the warning.
learning_rate
The corrected code for the cell I presume is : model = vgg6(input_shape=image_shape, n_classes=n_classes)
if optimizer == 'adam': optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False) elif optimizer == 'sgd': optimizer = tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.9, decay=1e-6, nesterov=True) else: print('Could not recognize optimizer, using Adam') optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False)
model.compile(optimizer=optimizer, loss=loss, metrics=['accuracy'])
print(model.summary())
The text was updated successfully, but these errors were encountered:
No branches or pull requests
lr
and decay are deprecated in Keras optimizer, usinglearning_rate
corrects the warning.The corrected code for the cell I presume is :
model = vgg6(input_shape=image_shape, n_classes=n_classes)
Set up optimizer:
if optimizer == 'adam':
optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False)
elif optimizer == 'sgd':
optimizer = tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.9, decay=1e-6, nesterov=True)
else:
print('Could not recognize optimizer, using Adam')
optimizer = tf.keras.optimizers.Adam(learning_rate=3e-4, beta_1=0.9, beta_2=0.999, epsilon=None, amsgrad=False)
model.compile(optimizer=optimizer, loss=loss, metrics=['accuracy'])
print(model.summary())
The text was updated successfully, but these errors were encountered: