Skip to content

Instantly share code, notes, and snippets.

@LayanCS
LayanCS / Adam.py
Last active February 8, 2023 18:22
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.
@LayanCS
LayanCS / torch.py
Last active August 30, 2020 04:22
import torch
torch.optim.Adam(params, lr=0.001, betas=(0.9, 0.999),
eps=1e-08, weight_decay=0, amsgrad=False)
@LayanCS
LayanCS / tensorflow.py
Created August 30, 2020 03:56
Adam with TensorFlow
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')
@LayanCS
LayanCS / readme.md
Last active September 10, 2020 07:40 — forked from benstr/readme.md
Gist Markdown Cheatsheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph