Paragraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# SOURCE: https://www.deeplearning.ai/deep-learning-specialization/ | |
def initialize_adam(parameters) : | |
""" | |
Initializes m and v as two python dictionaries with: | |
- keys: "dW1", "db1", ..., "dWL", "dbL" | |
- values: numpy arrays of zeros of the same shape as the corresponding gradients/parameters. | |
Arguments: | |
parameters -- python dictionary containing your parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
torch.optim.Adam(params, lr=0.001, betas=(0.9, 0.999), | |
eps=1e-08, weight_decay=0, amsgrad=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
tf.keras.optimizers.Adam( | |
learning_rate=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-07, amsgrad=False, | |
name='Adam') |